summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGValue.h
diff options
context:
space:
mode:
authorIvan A. Kosarev <ikosarev@accesssoftek.com>2017-10-02 09:54:47 +0000
committerIvan A. Kosarev <ikosarev@accesssoftek.com>2017-10-02 09:54:47 +0000
commit289574edc0a53541b7e0eb7d30d60adb3d90e32f (patch)
tree9a0aa6e1bb427eb74c92894bf379932a6e527890 /clang/lib/CodeGen/CGValue.h
parentc04c7443ea45a3f52fecebe8090d04b4b563cb86 (diff)
downloadbcm5719-llvm-289574edc0a53541b7e0eb7d30d60adb3d90e32f.tar.gz
bcm5719-llvm-289574edc0a53541b7e0eb7d30d60adb3d90e32f.zip
[CodeGen] Do not refer to complete TBAA info where we actually deal with just TBAA access types
This patch fixes misleading names of entities related to getting, setting and generation of TBAA access type descriptors. This is effectively an attempt to provide a review for D37826 by breaking it into smaller pieces. Differential Revision: https://reviews.llvm.org/D38404 llvm-svn: 314657
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r--clang/lib/CodeGen/CGValue.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h
index b768eb86367..02e2bab1f5b 100644
--- a/clang/lib/CodeGen/CGValue.h
+++ b/clang/lib/CodeGen/CGValue.h
@@ -227,18 +227,19 @@ class LValue {
Expr *BaseIvarExp;
- /// Used by struct-path-aware TBAA.
+ /// TBAABaseType - The base access type used by TBAA.
QualType TBAABaseType;
- /// Offset relative to the base type.
+
+ /// TBAAOffset - Access offset used by TBAA.
uint64_t TBAAOffset;
- /// TBAAInfo - TBAA information to attach to dereferences of this LValue.
- llvm::MDNode *TBAAInfo;
+ /// TBAAInfo - The final access type used by TBAA.
+ llvm::MDNode *TBAAAccessType;
private:
void Initialize(QualType Type, Qualifiers Quals,
CharUnits Alignment, LValueBaseInfo BaseInfo,
- llvm::MDNode *TBAAInfo = nullptr) {
+ llvm::MDNode *TBAAAccessType = nullptr) {
assert((!Alignment.isZero() || Type->isIncompleteType()) &&
"initializing l-value with zero alignment!");
this->Type = Type;
@@ -258,7 +259,7 @@ private:
// Initialize fields for TBAA.
this->TBAABaseType = Type;
this->TBAAOffset = 0;
- this->TBAAInfo = TBAAInfo;
+ this->TBAAAccessType = TBAAAccessType;
}
public:
@@ -324,8 +325,8 @@ public:
uint64_t getTBAAOffset() const { return TBAAOffset; }
void setTBAAOffset(uint64_t O) { TBAAOffset = O; }
- llvm::MDNode *getTBAAInfo() const { return TBAAInfo; }
- void setTBAAInfo(llvm::MDNode *N) { TBAAInfo = N; }
+ llvm::MDNode *getTBAAAccessType() const { return TBAAAccessType; }
+ void setTBAAAccessType(llvm::MDNode *N) { TBAAAccessType = N; }
const Qualifiers &getQuals() const { return Quals; }
Qualifiers &getQuals() { return Quals; }
@@ -386,7 +387,7 @@ public:
static LValue MakeAddr(Address address, QualType type,
ASTContext &Context,
LValueBaseInfo BaseInfo,
- llvm::MDNode *TBAAInfo = nullptr) {
+ llvm::MDNode *TBAAAccessType = nullptr) {
Qualifiers qs = type.getQualifiers();
qs.setObjCGCAttr(Context.getObjCGCAttrKind(type));
@@ -394,7 +395,7 @@ public:
R.LVType = Simple;
assert(address.getPointer()->getType()->isPointerTy());
R.V = address.getPointer();
- R.Initialize(type, qs, address.getAlignment(), BaseInfo, TBAAInfo);
+ R.Initialize(type, qs, address.getAlignment(), BaseInfo, TBAAAccessType);
return R;
}
OpenPOWER on IntegriCloud