Skip to content

Commit c106a8c

Browse files
committed
Don't check AS names in frontend
1 parent d8a5a97 commit c106a8c

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
@@ -18423,14 +18423,13 @@ void CodeGenFunction::AddAMDGCNFenceAddressSpaceMMRA(llvm::Instruction *Inst,
1842318423
for (unsigned K = 2; K < E->getNumArgs(); ++K) {
1842418424
llvm::Value *V = EmitScalarExpr(E->getArg(K));
1842518425
StringRef AS;
18426-
if (llvm::getConstantStringInfo(V, AS) &&
18427-
(AS == "local" || AS == "global" || AS == "image")) {
18426+
if (llvm::getConstantStringInfo(V, AS)) {
1842818427
MMRAs.push_back({Tag, AS});
1842918428
// TODO: Delete the resulting unused constant?
1843018429
continue;
1843118430
}
1843218431
CGM.Error(E->getExprLoc(),
18433-
"expected one of \"local\", \"global\" or \"image\"");
18432+
"expected an address space name as a string literal");
1843418433
}
1843518434

1843618435
llvm::unique(MMRAs);

0 commit comments

Comments
 (0)