Skip to content

Commit 384c96b

Browse files
author
Artem Gindinson
committed
Merge from 'main' to 'sycl-web' (#74)
CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/Linux.cpp
2 parents baf8901 + 874bdc8 commit 384c96b

File tree

329 files changed

+6347
-3596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+6347
-3596
lines changed

clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ void TerminatingContinueCheck::registerMatchers(MatchFinder *Finder) {
2626
equalsBoundNode("closestLoop"));
2727

2828
Finder->addMatcher(
29-
continueStmt(hasAncestor(stmt(anyOf(forStmt(), whileStmt(),
30-
cxxForRangeStmt(), doStmt()))
31-
.bind("closestLoop")),
32-
hasAncestor(DoWithFalse))
29+
continueStmt(
30+
hasAncestor(stmt(anyOf(forStmt(), whileStmt(), cxxForRangeStmt(),
31+
doStmt(), switchStmt()))
32+
.bind("closestLoop")),
33+
hasAncestor(DoWithFalse))
3334
.bind("continue"),
3435
this);
3536
}

clang-tools-extra/test/clang-tidy/checkers/bugprone-terminating-continue.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ void f() {
3232
// CHECK-MESSAGES: :[[@LINE-1]]:16: warning: 'continue' in loop with false condition is equivalent to 'break' [bugprone-terminating-continue]
3333
// CHECK-FIXES: if (x > 0) break;
3434
} while (false);
35+
36+
switch (2) {
37+
case 2:
38+
do {
39+
continue; // LoopInSwitch
40+
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: 'continue' in loop with false condition is equivalent to 'break' [bugprone-terminating-continue]
41+
// CHECK-FIXES: break; // LoopInSwitch
42+
} while (0);
43+
}
3544
}
3645

3746
void g() {
@@ -62,4 +71,12 @@ void g() {
6271
if (n>2) continue;
6372
}
6473
} while (false);
74+
75+
do {
76+
switch (2) {
77+
case 1:
78+
case 2:
79+
continue;
80+
}
81+
} while (false);
6582
}

clang/docs/LibASTMatchersReference.html

+35
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,16 @@ <h2 id="decl-matchers">Node Matchers</h2>
13371337
</pre></td></tr>
13381338

13391339

1340+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('coawaitExpr0')"><a name="coawaitExpr0Anchor">coawaitExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CoawaitExpr.html">CoawaitExpr</a>&gt;...</td></tr>
1341+
<tr><td colspan="4" class="doc" id="coawaitExpr0"><pre>Matches co_await expressions.
1342+
1343+
Given
1344+
co_await 1;
1345+
coawaitExpr()
1346+
matches 'co_await 1'
1347+
</pre></td></tr>
1348+
1349+
13401350
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('compoundLiteralExpr0')"><a name="compoundLiteralExpr0Anchor">compoundLiteralExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CompoundLiteralExpr.html">CompoundLiteralExpr</a>&gt;...</td></tr>
13411351
<tr><td colspan="4" class="doc" id="compoundLiteralExpr0"><pre>Matches compound (i.e. non-scalar) literals
13421352

@@ -1383,6 +1393,26 @@ <h2 id="decl-matchers">Node Matchers</h2>
13831393
</pre></td></tr>
13841394

13851395

1396+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('coreturnStmt0')"><a name="coreturnStmt0Anchor">coreturnStmt</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CoreturnStmt.html">CoreturnStmt</a>&gt;...</td></tr>
1397+
<tr><td colspan="4" class="doc" id="coreturnStmt0"><pre>Matches co_return statements.
1398+
1399+
Given
1400+
while (true) { co_return; }
1401+
coreturnStmt()
1402+
matches 'co_return'
1403+
</pre></td></tr>
1404+
1405+
1406+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('coyieldExpr0')"><a name="coyieldExpr0Anchor">coyieldExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CoyieldExpr.html">CoyieldExpr</a>&gt;...</td></tr>
1407+
<tr><td colspan="4" class="doc" id="coyieldExpr0"><pre>Matches co_yield expressions.
1408+
1409+
Given
1410+
co_yield 1;
1411+
coyieldExpr()
1412+
matches 'co_yield 1'
1413+
</pre></td></tr>
1414+
1415+
13861416
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('cudaKernelCallExpr0')"><a name="cudaKernelCallExpr0Anchor">cudaKernelCallExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CUDAKernelCallExpr.html">CUDAKernelCallExpr</a>&gt;...</td></tr>
13871417
<tr><td colspan="4" class="doc" id="cudaKernelCallExpr0"><pre>Matches CUDA kernel call expression.
13881418

@@ -1698,6 +1728,11 @@ <h2 id="decl-matchers">Node Matchers</h2>
16981728
</pre></td></tr>
16991729

17001730

1731+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('dependentCoawaitExpr0')"><a name="dependentCoawaitExpr0Anchor">dependentCoawaitExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DependentCoawaitExpr.html">DependentCoawaitExpr</a>&gt;...</td></tr>
1732+
<tr><td colspan="4" class="doc" id="dependentCoawaitExpr0"><pre>Matches co_await expressions where the type of the promise is dependent
1733+
</pre></td></tr>
1734+
1735+
17011736
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt;</td><td class="name" onclick="toggle('designatedInitExpr0')"><a name="designatedInitExpr0Anchor">designatedInitExpr</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DesignatedInitExpr.html">DesignatedInitExpr</a>&gt;...</td></tr>
17021737
<tr><td colspan="4" class="doc" id="designatedInitExpr0"><pre>Matches C99 designated initializer expressions [C99 6.7.8].
17031738

clang/include/clang/ASTMatchers/ASTMatchers.h

+35
Original file line numberDiff line numberDiff line change
@@ -2162,6 +2162,17 @@ extern const internal::VariadicDynCastAllOfMatcher<Stmt, BreakStmt> breakStmt;
21622162
extern const internal::VariadicDynCastAllOfMatcher<Stmt, ContinueStmt>
21632163
continueStmt;
21642164

2165+
/// Matches co_return statements.
2166+
///
2167+
/// Given
2168+
/// \code
2169+
/// while (true) { co_return; }
2170+
/// \endcode
2171+
/// coreturnStmt()
2172+
/// matches 'co_return'
2173+
extern const internal::VariadicDynCastAllOfMatcher<Stmt, CoreturnStmt>
2174+
coreturnStmt;
2175+
21652176
/// Matches return statements.
21662177
///
21672178
/// Given
@@ -2379,6 +2390,30 @@ extern const internal::VariadicDynCastAllOfMatcher<Stmt, UserDefinedLiteral>
23792390
extern const internal::VariadicDynCastAllOfMatcher<Stmt, CompoundLiteralExpr>
23802391
compoundLiteralExpr;
23812392

2393+
/// Matches co_await expressions.
2394+
///
2395+
/// Given
2396+
/// \code
2397+
/// co_await 1;
2398+
/// \endcode
2399+
/// coawaitExpr()
2400+
/// matches 'co_await 1'
2401+
extern const internal::VariadicDynCastAllOfMatcher<Stmt, CoawaitExpr>
2402+
coawaitExpr;
2403+
/// Matches co_await expressions where the type of the promise is dependent
2404+
extern const internal::VariadicDynCastAllOfMatcher<Stmt, DependentCoawaitExpr>
2405+
dependentCoawaitExpr;
2406+
/// Matches co_yield expressions.
2407+
///
2408+
/// Given
2409+
/// \code
2410+
/// co_yield 1;
2411+
/// \endcode
2412+
/// coyieldExpr()
2413+
/// matches 'co_yield 1'
2414+
extern const internal::VariadicDynCastAllOfMatcher<Stmt, CoyieldExpr>
2415+
coyieldExpr;
2416+
23822417
/// Matches nullptr literal.
23832418
extern const internal::VariadicDynCastAllOfMatcher<Stmt, CXXNullPtrLiteralExpr>
23842419
cxxNullPtrLiteralExpr;

clang/lib/ASTMatchers/ASTMatchersInternal.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ const internal::VariadicDynCastAllOfMatcher<Stmt, WhileStmt> whileStmt;
883883
const internal::VariadicDynCastAllOfMatcher<Stmt, DoStmt> doStmt;
884884
const internal::VariadicDynCastAllOfMatcher<Stmt, BreakStmt> breakStmt;
885885
const internal::VariadicDynCastAllOfMatcher<Stmt, ContinueStmt> continueStmt;
886+
const internal::VariadicDynCastAllOfMatcher<Stmt, CoreturnStmt> coreturnStmt;
886887
const internal::VariadicDynCastAllOfMatcher<Stmt, ReturnStmt> returnStmt;
887888
const internal::VariadicDynCastAllOfMatcher<Stmt, GotoStmt> gotoStmt;
888889
const internal::VariadicDynCastAllOfMatcher<Stmt, LabelStmt> labelStmt;
@@ -915,6 +916,12 @@ const internal::VariadicDynCastAllOfMatcher<Stmt, CompoundLiteralExpr>
915916
const internal::VariadicDynCastAllOfMatcher<Stmt, CXXNullPtrLiteralExpr>
916917
cxxNullPtrLiteralExpr;
917918
const internal::VariadicDynCastAllOfMatcher<Stmt, ChooseExpr> chooseExpr;
919+
const internal::VariadicDynCastAllOfMatcher<Stmt, CoawaitExpr>
920+
coawaitExpr;
921+
const internal::VariadicDynCastAllOfMatcher<Stmt, DependentCoawaitExpr>
922+
dependentCoawaitExpr;
923+
const internal::VariadicDynCastAllOfMatcher<Stmt, CoyieldExpr>
924+
coyieldExpr;
918925
const internal::VariadicDynCastAllOfMatcher<Stmt, GNUNullExpr> gnuNullExpr;
919926
const internal::VariadicDynCastAllOfMatcher<Stmt, GenericSelectionExpr>
920927
genericSelectionExpr;

clang/lib/ASTMatchers/Dynamic/Registry.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,14 @@ RegistryMaps::RegistryMaps() {
166166
REGISTER_MATCHER(complexType);
167167
REGISTER_MATCHER(compoundLiteralExpr);
168168
REGISTER_MATCHER(compoundStmt);
169+
REGISTER_MATCHER(coawaitExpr);
169170
REGISTER_MATCHER(conditionalOperator);
170171
REGISTER_MATCHER(constantArrayType);
171172
REGISTER_MATCHER(constantExpr);
172173
REGISTER_MATCHER(containsDeclaration);
173174
REGISTER_MATCHER(continueStmt);
175+
REGISTER_MATCHER(coreturnStmt);
176+
REGISTER_MATCHER(coyieldExpr);
174177
REGISTER_MATCHER(cudaKernelCallExpr);
175178
REGISTER_MATCHER(cxxBindTemporaryExpr);
176179
REGISTER_MATCHER(cxxBoolLiteral);
@@ -214,6 +217,7 @@ RegistryMaps::RegistryMaps() {
214217
REGISTER_MATCHER(decltypeType);
215218
REGISTER_MATCHER(deducedTemplateSpecializationType);
216219
REGISTER_MATCHER(defaultStmt);
220+
REGISTER_MATCHER(dependentCoawaitExpr);
217221
REGISTER_MATCHER(dependentSizedArrayType);
218222
REGISTER_MATCHER(designatedInitExpr);
219223
REGISTER_MATCHER(designatorCountIs);

clang/lib/CodeGen/CGStmt.cpp

+16-7
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,11 @@ void CodeGenFunction::EmitWhileStmt(const WhileStmt &S,
821821
llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
822822
if (ConditionScope.requiresCleanups())
823823
ExitBlock = createBasicBlock("while.exit");
824-
llvm::MDNode *Weights = createProfileOrBranchWeightsForLoop(
825-
S.getCond(), getProfileCount(S.getBody()), S.getBody());
824+
llvm::MDNode *Weights =
825+
createProfileWeightsForLoop(S.getCond(), getProfileCount(S.getBody()));
826+
if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
827+
BoolCondVal = emitCondLikelihoodViaExpectIntrinsic(
828+
BoolCondVal, Stmt::getLikelihood(S.getBody()));
826829
Builder.CreateCondBr(BoolCondVal, LoopBody, ExitBlock, Weights);
827830

828831
if (ExitBlock != LoopExit.getBlock()) {
@@ -1008,8 +1011,11 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
10081011
// C99 6.8.5p2/p4: The first substatement is executed if the expression
10091012
// compares unequal to 0. The condition must be a scalar type.
10101013
llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
1011-
llvm::MDNode *Weights = createProfileOrBranchWeightsForLoop(
1012-
S.getCond(), getProfileCount(S.getBody()), S.getBody());
1014+
llvm::MDNode *Weights =
1015+
createProfileWeightsForLoop(S.getCond(), getProfileCount(S.getBody()));
1016+
if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
1017+
BoolCondVal = emitCondLikelihoodViaExpectIntrinsic(
1018+
BoolCondVal, Stmt::getLikelihood(S.getBody()));
10131019

10141020
if (llvm::ConstantInt *C = dyn_cast<llvm::ConstantInt>(BoolCondVal))
10151021
if (C->isOne())
@@ -1094,8 +1100,11 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S,
10941100
// The body is executed if the expression, contextually converted
10951101
// to bool, is true.
10961102
llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
1097-
llvm::MDNode *Weights = createProfileOrBranchWeightsForLoop(
1098-
S.getCond(), getProfileCount(S.getBody()), S.getBody());
1103+
llvm::MDNode *Weights =
1104+
createProfileWeightsForLoop(S.getCond(), getProfileCount(S.getBody()));
1105+
if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
1106+
BoolCondVal = emitCondLikelihoodViaExpectIntrinsic(
1107+
BoolCondVal, Stmt::getLikelihood(S.getBody()));
10991108
Builder.CreateCondBr(BoolCondVal, ForBody, ExitBlock, Weights);
11001109

11011110
if (ExitBlock != LoopExit.getBlock()) {
@@ -1369,7 +1378,7 @@ void CodeGenFunction::EmitCaseStmtRange(const CaseStmt &S,
13691378
// this case.
13701379
(*SwitchWeights)[0] += ThisCount;
13711380
} else if (SwitchLikelihood)
1372-
Weights = createBranchWeights(LH);
1381+
Cond = emitCondLikelihoodViaExpectIntrinsic(Cond, LH);
13731382

13741383
Builder.CreateCondBr(Cond, CaseDest, FalseDest, Weights);
13751384

clang/lib/CodeGen/CodeGenFunction.cpp

+34-35
Original file line numberDiff line numberDiff line change
@@ -1892,10 +1892,19 @@ void CodeGenFunction::EmitBranchOnBoolExpr(const Expr *Cond,
18921892
return;
18931893
}
18941894

1895+
// Emit the code with the fully general case.
1896+
llvm::Value *CondV;
1897+
{
1898+
ApplyDebugLocation DL(*this, Cond);
1899+
CondV = EvaluateExprAsBool(Cond);
1900+
}
1901+
1902+
llvm::MDNode *Weights = nullptr;
1903+
llvm::MDNode *Unpredictable = nullptr;
1904+
18951905
// If the branch has a condition wrapped by __builtin_unpredictable,
18961906
// create metadata that specifies that the branch is unpredictable.
18971907
// Don't bother if not optimizing because that metadata would not be used.
1898-
llvm::MDNode *Unpredictable = nullptr;
18991908
auto *Call = dyn_cast<CallExpr>(Cond->IgnoreImpCasts());
19001909
if (Call && CGM.getCodeGenOpts().OptimizationLevel != 0) {
19011910
auto *FD = dyn_cast_or_null<FunctionDecl>(Call->getCalleeDecl());
@@ -1905,18 +1914,17 @@ void CodeGenFunction::EmitBranchOnBoolExpr(const Expr *Cond,
19051914
}
19061915
}
19071916

1908-
llvm::MDNode *Weights = createBranchWeights(LH);
1909-
if (!Weights) {
1917+
// If there is a Likelihood knowledge for the cond, lower it.
1918+
// Note that if not optimizing this won't emit anything.
1919+
llvm::Value *NewCondV = emitCondLikelihoodViaExpectIntrinsic(CondV, LH);
1920+
if (CondV != NewCondV)
1921+
CondV = NewCondV;
1922+
else {
1923+
// Otherwise, lower profile counts. Note that we do this even at -O0.
19101924
uint64_t CurrentCount = std::max(getCurrentProfileCount(), TrueCount);
19111925
Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
19121926
}
19131927

1914-
// Emit the code with the fully general case.
1915-
llvm::Value *CondV;
1916-
{
1917-
ApplyDebugLocation DL(*this, Cond);
1918-
CondV = EvaluateExprAsBool(Cond);
1919-
}
19201928
Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
19211929
}
19221930

@@ -2808,35 +2816,26 @@ llvm::DebugLoc CodeGenFunction::SourceLocToDebugLoc(SourceLocation Location) {
28082816
return llvm::DebugLoc();
28092817
}
28102818

2811-
static Optional<std::pair<uint32_t, uint32_t>>
2812-
getLikelihoodWeights(Stmt::Likelihood LH) {
2819+
llvm::Value *
2820+
CodeGenFunction::emitCondLikelihoodViaExpectIntrinsic(llvm::Value *Cond,
2821+
Stmt::Likelihood LH) {
28132822
switch (LH) {
2814-
case Stmt::LH_Unlikely:
2815-
return std::pair<uint32_t, uint32_t>(llvm::UnlikelyBranchWeight,
2816-
llvm::LikelyBranchWeight);
28172823
case Stmt::LH_None:
2818-
return None;
2824+
return Cond;
28192825
case Stmt::LH_Likely:
2820-
return std::pair<uint32_t, uint32_t>(llvm::LikelyBranchWeight,
2821-
llvm::UnlikelyBranchWeight);
2826+
case Stmt::LH_Unlikely:
2827+
// Don't generate llvm.expect on -O0 as the backend won't use it for
2828+
// anything.
2829+
if (CGM.getCodeGenOpts().OptimizationLevel == 0)
2830+
return Cond;
2831+
llvm::Type *CondTy = Cond->getType();
2832+
assert(CondTy->isIntegerTy(1) && "expecting condition to be a boolean");
2833+
llvm::Function *FnExpect =
2834+
CGM.getIntrinsic(llvm::Intrinsic::expect, CondTy);
2835+
llvm::Value *ExpectedValueOfCond =
2836+
llvm::ConstantInt::getBool(CondTy, LH == Stmt::LH_Likely);
2837+
return Builder.CreateCall(FnExpect, {Cond, ExpectedValueOfCond},
2838+
Cond->getName() + ".expval");
28222839
}
28232840
llvm_unreachable("Unknown Likelihood");
28242841
}
2825-
2826-
llvm::MDNode *CodeGenFunction::createBranchWeights(Stmt::Likelihood LH) const {
2827-
Optional<std::pair<uint32_t, uint32_t>> LHW = getLikelihoodWeights(LH);
2828-
if (!LHW)
2829-
return nullptr;
2830-
2831-
llvm::MDBuilder MDHelper(CGM.getLLVMContext());
2832-
return MDHelper.createBranchWeights(LHW->first, LHW->second);
2833-
}
2834-
2835-
llvm::MDNode *CodeGenFunction::createProfileOrBranchWeightsForLoop(
2836-
const Stmt *Cond, uint64_t LoopCount, const Stmt *Body) const {
2837-
llvm::MDNode *Weights = createProfileWeightsForLoop(Cond, LoopCount);
2838-
if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
2839-
Weights = createBranchWeights(Stmt::getLikelihood(Body));
2840-
2841-
return Weights;
2842-
}

clang/lib/CodeGen/CodeGenFunction.h

+3-9
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,9 @@ class CodeGenFunction : public CodeGenTypeCache {
14451445
};
14461446
OpenMPCancelExitStack OMPCancelStack;
14471447

1448-
/// Calculate branch weights for the likelihood attribute
1449-
llvm::MDNode *createBranchWeights(Stmt::Likelihood LH) const;
1448+
/// Lower the Likelihood knowledge about the \p Cond via llvm.expect intrin.
1449+
llvm::Value *emitCondLikelihoodViaExpectIntrinsic(llvm::Value *Cond,
1450+
Stmt::Likelihood LH);
14501451

14511452
CodeGenPGO PGO;
14521453

@@ -1457,13 +1458,6 @@ class CodeGenFunction : public CodeGenTypeCache {
14571458
llvm::MDNode *createProfileWeightsForLoop(const Stmt *Cond,
14581459
uint64_t LoopCount) const;
14591460

1460-
/// Calculate the branch weight for PGO data or the likelihood attribute.
1461-
/// The function tries to get the weight of \ref createProfileWeightsForLoop.
1462-
/// If that fails it gets the weight of \ref createBranchWeights.
1463-
llvm::MDNode *createProfileOrBranchWeightsForLoop(const Stmt *Cond,
1464-
uint64_t LoopCount,
1465-
const Stmt *Body) const;
1466-
14671461
public:
14681462
/// Increment the profiler's counter for the given statement by \p StepV.
14691463
/// If \p StepV is null, the default increment is 1.

clang/lib/Driver/ToolChains/FreeBSD.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
409409
void FreeBSD::addLibStdCxxIncludePaths(
410410
const llvm::opt::ArgList &DriverArgs,
411411
llvm::opt::ArgStringList &CC1Args) const {
412-
addLibStdCXXIncludePaths(getDriver().SysRoot, "/usr/include/c++/4.2", "", "",
413-
"", "", DriverArgs, CC1Args);
412+
addLibStdCXXIncludePaths(getDriver().SysRoot + "/usr/include/c++/4.2", "", "",
413+
DriverArgs, CC1Args);
414414
}
415415

416416
void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args,

0 commit comments

Comments
 (0)