diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-12-02 21:29:56 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-12-02 21:29:56 +0000 |
commit | 8b4306ce050bd58d8457e16fbbc26dafde7cd181 (patch) | |
tree | 963eefcbb7683b2d3e5590bde5e610854d418377 /llvm/lib/AsmParser/LLParser.cpp | |
parent | e601b504b62cabdec1bca2f21edccb1722ef877e (diff) | |
download | bcm5719-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/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 20fa0f4eab1..3b903cdb090 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -182,6 +182,8 @@ bool LLParser::ValidateEndOfModule() { for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ) UpgradeCallsToIntrinsic(FI++); // must be post-increment, as we remove + UpgradeDebugInfo(*M); + return false; } |