resolving an issue with Debug Info metadata after LLVM_3_4
This commit is contained in:
11
module.cpp
11
module.cpp
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2010-2013, Intel Corporation
|
Copyright (c) 2010-2014, Intel Corporation
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@@ -949,6 +949,15 @@ Module::writeOutput(OutputType outputType, const char *outFileName,
|
|||||||
lStripUnusedDebugInfo(module);
|
lStripUnusedDebugInfo(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (LLVM_3_4) || defined (LLVM_3_5)
|
||||||
|
// In LLVM_3_4 after r195494 and r195504 revisions we should pass
|
||||||
|
// "Debug Info Version" constant to the module. LLVM will ignore
|
||||||
|
// our Debug Info metadata without it.
|
||||||
|
if (g->generateDebuggingSymbols == true) {
|
||||||
|
module->addModuleFlag(llvm::Module::Error, "Debug Info Version", llvm::DEBUG_METADATA_VERSION);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// First, issue a warning if the output file suffix and the type of
|
// First, issue a warning if the output file suffix and the type of
|
||||||
// file being created seem to mismatch. This can help catch missing
|
// file being created seem to mismatch. This can help catch missing
|
||||||
// command-line arguments specifying the output file type.
|
// command-line arguments specifying the output file type.
|
||||||
|
|||||||
Reference in New Issue
Block a user