Any person whose liver is grossly impaired should not take medicines which are metabolised/cleared by the liver. The list is too long. It is best not to take any medicine without doctors informed prescription i.e. the doctor should be told that the persons liver is impaired.
Nearly all pain-killers belonging to the Non-Steroidal Anti-inflammatory Drugs (NSAIDs) such as nimesulide, celecoxib, aceclofenac, indomethacin, diclofenac, piroxicam etc. etc. sold under scores of brand names (such as Voveran, Dolonex, Esgipyrin, Etoxib, Jonac, Movon, Ponstan, Relaxyl tablets, Tromagesic and many others) must be avoided. While all NSAIDs have adverse effect on the liver, some such as Nimesulide (sold under the brand names of Nimulid, Nise etc) is particularly toxic and has resulted in deaths due to liver failure.