summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-12-02 21:29:56 +0000
committerManman Ren <manman.ren@gmail.com>2013-12-02 21:29:56 +0000
commit8b4306ce050bd58d8457e16fbbc26dafde7cd181 (patch)
tree963eefcbb7683b2d3e5590bde5e610854d418377 /llvm/lib/Bitcode/Reader
parente601b504b62cabdec1bca2f21edccb1722ef877e (diff)
downloadbcm5719-llvm-8b4306ce050bd58d8457e16fbbc26dafde7cd181.tar.gz
bcm5719-llvm-8b4306ce050bd58d8457e16fbbc26dafde7cd181.zip
Debug Info: drop debug info via upgrading path if version number does not match.
Add a helper function getDebugInfoVersionFromModule to return the debug info version number for a module. "Verifier/module-flags-1.ll" checks for verification errors. It will seg fault when calling getDebugInfoVersionFromModule because of the incorrect format for module flags in the testing case. We make getModuleFlagsMetadata more robust by checking for error conditions. PR17982 llvm-svn: 196158
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 2c95c920f84..ce3b7d163e5 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -3152,6 +3152,7 @@ error_code BitcodeReader::MaterializeModule(Module *M) {
for (unsigned I = 0, E = InstsWithTBAATag.size(); I < E; I++)
UpgradeInstWithTBAATag(InstsWithTBAATag[I]);
+ UpgradeDebugInfo(*M);
return error_code::success();
}
OpenPOWER on IntegriCloud