From 7749c87e33bfbbb466756f8e8c6cc8d0518b588e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 24 Jul 2017 16:16:17 +0000 Subject: [PATCH] Format some case labels and shrink an anonymous namespace NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308889 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 27 +++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index b5370e53f29..ec0f007371d 100644 --- a/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -545,8 +545,6 @@ void CodeViewDebug::emitTypeInformation() { } } -namespace { - static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { switch (DWLang) { case dwarf::DW_LANG_C: @@ -580,9 +578,11 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { } } +namespace { struct Version { int Part[4]; }; +} // end anonymous namespace // Takes a StringRef like "clang 4.0.0.0 (other nonsense 123)" and parses out // the version number. @@ -605,22 +605,19 @@ static Version parseVersion(StringRef Name) { static CPUType mapArchToCVCPUType(Triple::ArchType Type) { switch (Type) { - case Triple::ArchType::x86: - return CPUType::Pentium3; - case Triple::ArchType::x86_64: - return CPUType::X64; - case Triple::ArchType::thumb: - return CPUType::Thumb; - case Triple::ArchType::aarch64: - return CPUType::ARM64; - default: - report_fatal_error("target architecture doesn't map to a CodeView " - "CPUType"); + case Triple::ArchType::x86: + return CPUType::Pentium3; + case Triple::ArchType::x86_64: + return CPUType::X64; + case Triple::ArchType::thumb: + return CPUType::Thumb; + case Triple::ArchType::aarch64: + return CPUType::ARM64; + default: + report_fatal_error("target architecture doesn't map to a CodeView CPUType"); } } -} // end anonymous namespace - void CodeViewDebug::emitCompilerInformation() { MCContext &Context = MMI->getContext(); MCSymbol *CompilerBegin = Context.createTempSymbol(), -- 2.50.1