diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 2b4b4ce135f..cf6a922d23c 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -2789,7 +2789,12 @@ private:      if (Personality) {        Asm->EmitULEB128Bytes(7);        Asm->EOL("Augmentation Size"); -      Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect); + +      if (TAI->getNeedsIndirectEncoding()) +        Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect); +      else +        Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4); +        Asm->EOL("Personality (pcrel sdata4 indirect)");        PrintRelDirective();  | 

