r251599 - Driver: inline some small arrays
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 28 20:36:42 PDT 2015
Author: compnerd
Date: Wed Oct 28 22:36:42 2015
New Revision: 251599
URL: http://llvm.org/viewvc/llvm-project?rev=251599&view=rev
Log:
Driver: inline some small arrays
Use an initializer list to remove a couple of small static arrays. NFC.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=251599&r1=251598&r2=251599&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Oct 28 22:36:42 2015
@@ -9088,22 +9088,16 @@ void visualstudio::Linker::ConstructJob(
CmdArgs.push_back(Args.MakeArgString("-debug"));
CmdArgs.push_back(Args.MakeArgString("-incremental:no"));
if (Args.hasArg(options::OPT__SLASH_MD, options::OPT__SLASH_MDd)) {
- static const char *const CompilerRTComponents[] = {
- "asan_dynamic", "asan_dynamic_runtime_thunk",
- };
- for (const auto &Component : CompilerRTComponents)
- CmdArgs.push_back(TC.getCompilerRTArgString(Args, Component));
+ for (const auto &Lib : {"asan_dynamic", "asan_dynamic_runtime_thunk"})
+ CmdArgs.push_back(TC.getCompilerRTArgString(Args, Lib));
// Make sure the dynamic runtime thunk is not optimized out at link time
// to ensure proper SEH handling.
CmdArgs.push_back(Args.MakeArgString("-include:___asan_seh_interceptor"));
} else if (DLL) {
CmdArgs.push_back(TC.getCompilerRTArgString(Args, "asan_dll_thunk"));
} else {
- static const char *const CompilerRTComponents[] = {
- "asan", "asan_cxx",
- };
- for (const auto &Component : CompilerRTComponents)
- CmdArgs.push_back(TC.getCompilerRTArgString(Args, Component));
+ for (const auto &Lib : {"asan", "asan_cxx"})
+ CmdArgs.push_back(TC.getCompilerRTArgString(Args, Lib));
}
}
More information about the cfe-commits
mailing list