================
@@ -1215,6 +1215,84 @@ TypedefDecl *ASTContext::getUInt128Decl() const {
   return UInt128Decl;
 }
 
+TypedefDecl *ASTContext::getOrCreateMemoryScopeDecl() {
+  // Return cached value if already created
+  if (MemoryScopeDecl)
+    return MemoryScopeDecl;
+
+  // Check if user has already declared enum __memory_scope
+  // If so, we cannot create our builtin - return nullptr to signal error
+  const char *EnumName = "__memory_scope";
----------------
ssahasra wrote:

> Should this have a clang prefix?

Maybe, but I don't see any specific convention being followed for other things. 
Should the scoped atomic builtins have been called `__clang_scoped_atomic` 
builtins? Anyhow, the `__` prefix is reserved for the implementation, and I 
don't really have a strong opinion on `__clang`.

https://github.com/llvm/llvm-project/pull/185408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to