mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Make the default dwarf version 3 for darwin when we can't find one
in the module. Add a FIXME with a comment about darwin's ld. llvm-svn: 189902
This commit is contained in:
parent
5d3f56aa82
commit
9c353ced34
@ -174,8 +174,12 @@ DIType DbgVariable::getType() const {
|
||||
/// Return Dwarf Version by checking module flags.
|
||||
static unsigned getDwarfVersionFromModule(const Module *M) {
|
||||
Value *Val = M->getModuleFlag("Dwarf Version");
|
||||
// If we don't have a value in the module go ahead and use the default in
|
||||
// dwarf::DWARF_VERSION.
|
||||
// FIXME: Apple ld has a problem parsing compilation units that specify a
|
||||
// dwarf version of greater than 3.
|
||||
if (!Val)
|
||||
return dwarf::DWARF_VERSION;
|
||||
return Triple(M->getTargetTriple()).isOSDarwin() ? 3 : dwarf::DWARF_VERSION;
|
||||
return cast<ConstantInt>(Val)->getZExtValue();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user