projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1be3428
)
[CGStmt] Use helper functions to set memory attributes (NFC)
author
Nikita Popov
<npopov@redhat.com>
Wed, 12 Oct 2022 12:34:03 +0000
(14:34 +0200)
committer
Nikita Popov
<npopov@redhat.com>
Wed, 12 Oct 2022 14:38:39 +0000
(16:38 +0200)
clang/lib/CodeGen/CGStmt.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGStmt.cpp
b/clang/lib/CodeGen/CGStmt.cpp
index
ebbc79c
..
30c955b
100644
(file)
--- a/
clang/lib/CodeGen/CGStmt.cpp
+++ b/
clang/lib/CodeGen/CGStmt.cpp
@@
-2280,9
+2280,9
@@
static void UpdateAsmCallInst(llvm::CallBase &Result, bool HasSideEffect,
// Attach readnone and readonly attributes.
if (!HasSideEffect) {
if (ReadNone)
- Result.
addFnAttr(llvm::Attribute::ReadNone
);
+ Result.
setDoesNotAccessMemory(
);
else if (ReadOnly)
- Result.
addFnAttr(llvm::Attribute::ReadOnly
);
+ Result.
setOnlyReadsMemory(
);
}
// Add elementtype attribute for indirect constraints.