Fixes to release_36 from master

Hi Hans,

I have attached a unit test which demonstrates a hang/infinite loop with the opt built with release_36 sources.

The fixes are already pushed to “master” branch. The revisions r226588 and r226616 should be pushed to release_36 to fix the unit test.

–Sumanth G

test.ll (5.37 KB)

Adrian, are these safe to merge?

They seem to apply cleanly on the branch.

Yes both should be safe and allow the debug info verifier to not get stuck in an infinite loops when it comes across malformed (=outdated) metadata.

-- adrian

Merged in r228984 and r228985, respectively.