forked from OSchip/llvm-project
Driver: inline some small arrays
Use an initializer list to remove a couple of small static arrays. NFC. llvm-svn: 251599
This commit is contained in:
parent
8f431e7c4c
commit
b48f1fe4ee
|
@ -9088,22 +9088,16 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue