From 2ae7180b2455a7f2bfcaa3a16ae5e33d07b0e23c Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 28 Dec 2015 23:02:42 +0000 Subject: [PATCH] Accept dwarf version 5 for CIE versions. llvm-svn: 256527 --- llvm/lib/MC/MCDwarf.cpp | 1 + llvm/test/MC/ELF/cfi-version.ll | 1 + 2 files changed, 2 insertions(+) diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index c97d9bb6f92e..a99ac4eca59e 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -1248,6 +1248,7 @@ static unsigned getCIEVersion(bool IsEH, unsigned DwarfVersion) { case 3: return 3; case 4: + case 5: return 4; } llvm_unreachable("Unknown version"); diff --git a/llvm/test/MC/ELF/cfi-version.ll b/llvm/test/MC/ELF/cfi-version.ll index 71708a6489b5..6bb9f8ba8fe7 100644 --- a/llvm/test/MC/ELF/cfi-version.ll +++ b/llvm/test/MC/ELF/cfi-version.ll @@ -1,6 +1,7 @@ ; RUN: %llc_dwarf %s -o - -dwarf-version 2 -filetype=obj | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF2 ; RUN: %llc_dwarf %s -o - -dwarf-version 3 -filetype=obj | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF3 ; RUN: %llc_dwarf %s -o - -dwarf-version 4 -filetype=obj | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF4 +; RUN: %llc_dwarf %s -o - -dwarf-version 5 -filetype=obj | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF4 ; .debug_frame is not emitted for targeting Windows x64. ; REQUIRES: debug_frame