Merge "Use mangled name as unique id for C structs as well." am: 6456b0bfc9 am: 8be58e84b3

am: ab58583d8b

Change-Id: I9144c45bc2e2a4f19e185e3156fa3084b3875a6d
This commit is contained in:
Jayant Chowdhary
2017-12-19 18:28:10 +00:00
committed by android-build-merger
15 changed files with 34 additions and 38 deletions

View File

@@ -156,14 +156,10 @@ std::string RecordDeclWrapper::GetMangledRTTI(
std::string ABIWrapper::GetTypeUniqueId(const clang::TagDecl *tag_decl) {
clang::QualType qual_type =
tag_decl->getTypeForDecl()->getCanonicalTypeInternal();
// We need to mangle type names for C++ contexts.
if (!tag_decl->isExternCContext() && ast_contextp_->getLangOpts().CPlusPlus) {
llvm::SmallString<256> uid;
llvm::raw_svector_ostream out(uid);
mangle_contextp_->mangleCXXRTTIName(qual_type, out);
return uid.str();
}
return ABIWrapper::QualTypeToString(qual_type);
llvm::SmallString<256> uid;
llvm::raw_svector_ostream out(uid);
mangle_contextp_->mangleCXXRTTIName(qual_type, out);
return uid.str();
}
// CreateBasicNamedAndTypedDecl creates a BasicNamedAndTypedDecl : that'll

View File

@@ -204,7 +204,7 @@ record_types {
is_anonymous: true
record_kind: struct_kind
tag_info {
unique_id: "Hello::(anonymous)::(anonymous)"
unique_id: "_ZTSN5HelloUt1_Ut_E"
}
}
record_types {
@@ -238,7 +238,7 @@ record_types {
is_anonymous: true
record_kind: struct_kind
tag_info {
unique_id: "Hello::(anonymous)"
unique_id: "_ZTSN5HelloUt1_E"
}
}
record_types {
@@ -289,7 +289,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Hello"
unique_id: "_ZTS5Hello"
}
}
record_types {

View File

@@ -204,7 +204,7 @@ record_types {
is_anonymous: true
record_kind: struct_kind
tag_info {
unique_id: "Hello::(anonymous)::(anonymous)"
unique_id: "_ZTSN5HelloUt1_Ut_E"
}
}
record_types {
@@ -238,7 +238,7 @@ record_types {
is_anonymous: true
record_kind: struct_kind
tag_info {
unique_id: "Hello::(anonymous)"
unique_id: "_ZTSN5HelloUt1_E"
}
}
record_types {
@@ -289,7 +289,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Hello"
unique_id: "_ZTS5Hello"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {

View File

@@ -16,7 +16,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cinner"
unique_id: "_ZTS6Cinner"
}
}
record_types {
@@ -43,7 +43,7 @@ record_types {
access: public_access
record_kind: struct_kind
tag_info {
unique_id: "Cstruct"
unique_id: "_ZTS7Cstruct"
}
}
record_types {