r244110 - Remove unnecessary ClangLibdirSuffix variable.
Yaron Keren
yaron.keren at gmail.com
Wed Aug 5 13:06:56 PDT 2015
Author: yrnkrn
Date: Wed Aug 5 15:06:56 2015
New Revision: 244110
URL: http://llvm.org/viewvc/llvm-project?rev=244110&view=rev
Log:
Remove unnecessary ClangLibdirSuffix variable.
Twine + const char * is supported.
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=244110&r1=244109&r2=244110&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Aug 5 15:06:56 2015
@@ -1085,13 +1085,11 @@ std::string CompilerInvocation::GetResou
// Compute the path to the resource directory.
StringRef ClangResourceDir(CLANG_RESOURCE_DIR);
SmallString<128> P(Dir);
- if (ClangResourceDir != "") {
+ if (ClangResourceDir != "")
llvm::sys::path::append(P, ClangResourceDir);
- } else {
- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
- CLANG_VERSION_STRING);
- }
+ else
+ llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,
+ "clang", CLANG_VERSION_STRING);
return P.str();
}
More information about the cfe-commits
mailing list