aboutsummaryrefslogtreecommitdiff
path: root/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/PDB/PDBSymbolCompiland.cpp')
-rw-r--r--lib/DebugInfo/PDB/PDBSymbolCompiland.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
index bbc5e6dd2a17..9b2883546305 100644
--- a/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
+++ b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
@@ -1,9 +1,8 @@
//===- PDBSymbolCompiland.cpp - compiland details ---------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -91,16 +90,16 @@ std::string PDBSymbolCompiland::getSourceFileFullPath() const {
PDB_Lang Lang = Details ? Details->getLanguage() : PDB_Lang::Cpp;
auto SrcFiles = Session.getSourceFilesForCompiland(*this);
if (SrcFiles) {
- bool LangC = (Lang == PDB_Lang::Cpp || Lang == PDB_Lang::C);
while (auto File = SrcFiles->getNext()) {
std::string FileName = File->getFileName();
auto file_extension = sys::path::extension(FileName);
if (StringSwitch<bool>(file_extension.lower())
- .Case(".cpp", LangC)
- .Case(".c", LangC)
- .Case(".cc", LangC)
- .Case(".cxx", LangC)
+ .Case(".cpp", Lang == PDB_Lang::Cpp)
+ .Case(".cc", Lang == PDB_Lang::Cpp)
+ .Case(".cxx", Lang == PDB_Lang::Cpp)
+ .Case(".c", Lang == PDB_Lang::C)
.Case(".asm", Lang == PDB_Lang::Masm)
+ .Case(".swift", Lang == PDB_Lang::Swift)
.Default(false))
return File->getFileName();
}