diff options
| author | Aaron Smith <aaron.smith@microsoft.com> | 2018-04-10 15:25:04 +0000 |
|---|---|---|
| committer | Aaron Smith <aaron.smith@microsoft.com> | 2018-04-10 15:25:04 +0000 |
| commit | c0a5c01aebc4c7aa3f6abdd8c3e0a0f35db41ff4 (patch) | |
| tree | a23db1b46697cec5c090a7fe3c8b16c2ec8fc5b6 /llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp | |
| parent | b8800b025b17040fa6acbd5c9f2b1953f58ed1c1 (diff) | |
| download | bcm5719-llvm-c0a5c01aebc4c7aa3f6abdd8c3e0a0f35db41ff4.tar.gz bcm5719-llvm-c0a5c01aebc4c7aa3f6abdd8c3e0a0f35db41ff4.zip | |
[PDB] Remove dead code and run clang format; NFC
llvm-svn: 329712
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp index cea53a9b734..8798c7b9db8 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp @@ -1,4 +1,4 @@ -//===- PDBSymbolCompiland.cpp - compiland details --------*- C++ -*-===// +//===- PDBSymbolCompiland.cpp - compiland details ---------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ #include "llvm/DebugInfo/PDB/IPDBSourceFile.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" -#include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h" +#include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h" #include "llvm/DebugInfo/PDB/PDBSymDumper.h" #include "llvm/ADT/StringSwitch.h" @@ -33,7 +33,7 @@ void PDBSymbolCompiland::dump(PDBSymDumper &Dumper) const { } std::string PDBSymbolCompiland::getSourceFileName() const { - return llvm::sys::path::filename(getSourceFileFullPath()).str(); + return sys::path::filename(getSourceFileFullPath()).str(); } std::string PDBSymbolCompiland::getSourceFileFullPath() const { @@ -60,7 +60,7 @@ std::string PDBSymbolCompiland::getSourceFileFullPath() const { } if (Var == "src") { EnvSrc = Env->getValue(); - if (llvm::sys::path::is_absolute(EnvSrc)) + if (sys::path::is_absolute(EnvSrc)) return EnvSrc; RecordedResult = EnvSrc; continue; @@ -72,7 +72,7 @@ std::string PDBSymbolCompiland::getSourceFileFullPath() const { std::string Path = EnvWorkingDir + "\\" + EnvSrc; std::replace(Path.begin(), Path.end(), '/', '\\'); // We will return it as full path if we can't find a better one. - if (llvm::sys::path::is_absolute(Path)) + if (sys::path::is_absolute(Path)) SourceFileFullPath = Path; } } @@ -80,13 +80,12 @@ std::string PDBSymbolCompiland::getSourceFileFullPath() const { } if (!RecordedResult.empty()) { - if (llvm::sys::path::is_absolute(RecordedResult)) + if (sys::path::is_absolute(RecordedResult)) return RecordedResult; // This searches name that has same basename as the one in RecordedResult. - auto OneSrcFile = - Session.findOneSourceFile(this, RecordedResult, - PDB_NameSearchFlags::NS_CaseInsensitive); + auto OneSrcFile = Session.findOneSourceFile( + this, RecordedResult, PDB_NameSearchFlags::NS_CaseInsensitive); if (OneSrcFile) return OneSrcFile->getFileName(); } @@ -101,14 +100,14 @@ std::string PDBSymbolCompiland::getSourceFileFullPath() const { bool LangC = (Lang == PDB_Lang::Cpp || Lang == PDB_Lang::C); while (auto File = SrcFiles->getNext()) { std::string FileName = File->getFileName(); - auto file_extension = llvm::sys::path::extension(FileName); + 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(".asm", Lang == PDB_Lang::Masm) - .Default(false)) + .Case(".cpp", LangC) + .Case(".c", LangC) + .Case(".cc", LangC) + .Case(".cxx", LangC) + .Case(".asm", Lang == PDB_Lang::Masm) + .Default(false)) return File->getFileName(); } } |

