Changeset View
Changeset View
Standalone View
Standalone View
llvm/tools/llvm-config/llvm-config.cpp
Show First 20 Lines • Show All 373 Lines • ▼ Show 20 Lines | #endif | ||||
/// in the first place. This can't be done at configure/build time. | /// in the first place. This can't be done at configure/build time. | ||||
StringRef SharedExt, SharedVersionedExt, SharedDir, SharedPrefix, StaticExt, | StringRef SharedExt, SharedVersionedExt, SharedDir, SharedPrefix, StaticExt, | ||||
StaticPrefix, StaticDir = "lib"; | StaticPrefix, StaticDir = "lib"; | ||||
std::string DirSep = "/"; | std::string DirSep = "/"; | ||||
const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE)); | const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE)); | ||||
if (HostTriple.isOSWindows()) { | if (HostTriple.isOSWindows()) { | ||||
SharedExt = "dll"; | SharedExt = "dll"; | ||||
if (HostTriple.isWindowsGNUEnvironment) | |||||
Lint: Pre-merge checks: clang-tidy: error: reference to non-static member function must be called; did you mean to call… | |||||
mstorsjoUnsubmitted Shouldn't this be isWindowsGNUEnvironment()? mstorsjo: Shouldn't this be `isWindowsGNUEnvironment()`? | |||||
mati865AuthorUnsubmitted Sorry, I did not get along with my editor when making last second changes. mati865: Sorry, I did not get along with my editor when making last second changes.
I'll update diff… | |||||
SharedVersionedExt = ".dll"; | |||||
else | |||||
SharedVersionedExt = LLVM_DYLIB_VERSION ".dll"; | SharedVersionedExt = LLVM_DYLIB_VERSION ".dll"; | ||||
if (HostTriple.isOSCygMing()) { | if (HostTriple.isOSCygMing()) { | ||||
StaticExt = "a"; | StaticExt = "a"; | ||||
StaticPrefix = "lib"; | StaticPrefix = "lib"; | ||||
} else { | } else { | ||||
StaticExt = "lib"; | StaticExt = "lib"; | ||||
DirSep = "\\"; | DirSep = "\\"; | ||||
std::replace(ActiveObjRoot.begin(), ActiveObjRoot.end(), '/', '\\'); | std::replace(ActiveObjRoot.begin(), ActiveObjRoot.end(), '/', '\\'); | ||||
std::replace(ActivePrefix.begin(), ActivePrefix.end(), '/', '\\'); | std::replace(ActivePrefix.begin(), ActivePrefix.end(), '/', '\\'); | ||||
Show All 21 Lines | #endif | ||||
} | } | ||||
const bool BuiltDyLib = !!LLVM_ENABLE_DYLIB; | const bool BuiltDyLib = !!LLVM_ENABLE_DYLIB; | ||||
/// CMake style shared libs, ie each component is in a shared library. | /// CMake style shared libs, ie each component is in a shared library. | ||||
const bool BuiltSharedLibs = !!LLVM_ENABLE_SHARED; | const bool BuiltSharedLibs = !!LLVM_ENABLE_SHARED; | ||||
bool DyLibExists = false; | bool DyLibExists = false; | ||||
const std::string llvm_name = | |||||
Lint: Pre-merge checks clang-tidy: warning: invalid case style for variable 'llvm_name' [readability-identifier-naming] Lint: Pre-merge checks: clang-tidy: warning: invalid case style for variable 'llvm_name' [readability-identifier… | |||||
HostTriple.isWindowsGNUEnvironment ? "LLVM" : "LLVM-"; | |||||
Lint: Pre-merge checks clang-tidy: error: reference to non-static member function must be called; did you mean to call it with no arguments? [clang-diagnostic-error] Lint: Pre-merge checks: clang-tidy: error: reference to non-static member function must be called; did you mean to call… | |||||
const std::string DyLibName = | const std::string DyLibName = | ||||
(SharedPrefix + "LLVM-" + SharedVersionedExt).str(); | (SharedPrefix + llvm_name + SharedVersionedExt).str(); | ||||
// If LLVM_LINK_DYLIB is ON, the single shared library will be returned | // If LLVM_LINK_DYLIB is ON, the single shared library will be returned | ||||
// for "--libs", etc, if they exist. This behaviour can be overridden with | // for "--libs", etc, if they exist. This behaviour can be overridden with | ||||
// --link-static or --link-shared. | // --link-static or --link-shared. | ||||
bool LinkDyLib = !!LLVM_LINK_DYLIB; | bool LinkDyLib = !!LLVM_LINK_DYLIB; | ||||
if (BuiltDyLib) { | if (BuiltDyLib) { | ||||
std::string path((SharedDir + DirSep + DyLibName).str()); | std::string path((SharedDir + DirSep + DyLibName).str()); | ||||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |
clang-tidy: error: reference to non-static member function must be called; did you mean to call it with no arguments? [clang-diagnostic-error]
not useful