forked from OSchip/llvm-project
parent
9e1006d785
commit
ede603057e
|
@ -458,8 +458,8 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
|
|||
BackendArgs.push_back("-limit-float-precision");
|
||||
BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str());
|
||||
}
|
||||
for (unsigned i = 0, e = CodeGenOpts.BackendOptions.size(); i != e; ++i)
|
||||
BackendArgs.push_back(CodeGenOpts.BackendOptions[i].c_str());
|
||||
for (const std::string &BackendOption : CodeGenOpts.BackendOptions)
|
||||
BackendArgs.push_back(BackendOption.c_str());
|
||||
BackendArgs.push_back(nullptr);
|
||||
llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
|
||||
BackendArgs.data());
|
||||
|
|
|
@ -502,8 +502,8 @@ void CodeGenVTables::EmitThunks(GlobalDecl GD)
|
|||
if (!ThunkInfoVector)
|
||||
return;
|
||||
|
||||
for (unsigned I = 0, E = ThunkInfoVector->size(); I != E; ++I)
|
||||
emitThunk(GD, (*ThunkInfoVector)[I], /*ForVTable=*/false);
|
||||
for (const ThunkInfo& Thunk : *ThunkInfoVector)
|
||||
emitThunk(GD, Thunk, /*ForVTable=*/false);
|
||||
}
|
||||
|
||||
llvm::Constant *CodeGenVTables::CreateVTableInitializer(
|
||||
|
|
|
@ -333,8 +333,7 @@ void BackendConsumer::InlineAsmDiagHandler2(const llvm::SMDiagnostic &D,
|
|||
DiagnosticBuilder B = Diags.Report(Loc, diag::note_fe_inline_asm_here);
|
||||
// Convert the SMDiagnostic ranges into SourceRange and attach them
|
||||
// to the diagnostic.
|
||||
for (unsigned i = 0, e = D.getRanges().size(); i != e; ++i) {
|
||||
std::pair<unsigned, unsigned> Range = D.getRanges()[i];
|
||||
for (const std::pair<unsigned, unsigned> &Range : D.getRanges()) {
|
||||
unsigned Column = D.getColumnNo();
|
||||
B << SourceRange(Loc.getLocWithOffset(Range.first - Column),
|
||||
Loc.getLocWithOffset(Range.second - Column));
|
||||
|
|
|
@ -2079,9 +2079,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
|
|||
CodeGenFunction(CGM)
|
||||
.GenerateCXXGlobalInitFunc(InitFunc, CXXThreadLocalInits, Guard);
|
||||
}
|
||||
for (unsigned I = 0, N = CXXThreadLocals.size(); I != N; ++I) {
|
||||
const VarDecl *VD = CXXThreadLocals[I].first;
|
||||
llvm::GlobalVariable *Var = CXXThreadLocals[I].second;
|
||||
for (auto &I : CXXThreadLocals) {
|
||||
const VarDecl *VD = I.first;
|
||||
llvm::GlobalVariable *Var = I.second;
|
||||
|
||||
// Some targets require that all access to thread local variables go through
|
||||
// the thread wrapper. This means that we cannot attempt to create a thread
|
||||
|
|
Loading…
Reference in New Issue