Skip to content

Commit c6ba3da

Browse files
committed
Don't check AS names in frontend
1 parent eade534 commit c6ba3da

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18337,14 +18337,13 @@ void CodeGenFunction::AddAMDGCNFenceAddressSpaceMMRA(llvm::Instruction *Inst,
1833718337
for (unsigned K = 2; K < E->getNumArgs(); ++K) {
1833818338
llvm::Value *V = EmitScalarExpr(E->getArg(K));
1833918339
StringRef AS;
18340-
if (llvm::getConstantStringInfo(V, AS) &&
18341-
(AS == "local" || AS == "global" || AS == "image")) {
18340+
if (llvm::getConstantStringInfo(V, AS)) {
1834218341
MMRAs.push_back({Tag, AS});
1834318342
// TODO: Delete the resulting unused constant?
1834418343
continue;
1834518344
}
1834618345
CGM.Error(E->getExprLoc(),
18347-
"expected one of \"local\", \"global\" or \"image\"");
18346+
"expected an address space name as a string literal");
1834818347
}
1834918348

1835018349
llvm::unique(MMRAs);

0 commit comments

Comments
 (0)