diff options
| author | Zachary Turner <zturner@google.com> | 2018-11-20 22:13:23 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-11-20 22:13:23 +0000 |
| commit | 3826566c044e94f8c1e3d26c66f28a5545aab2bc (patch) | |
| tree | 205198e12d6d4852395b0e97c45baecdc0112dc2 /llvm/test | |
| parent | 8e9baa3f17c8e54906cbffbede6f9587fe01a8c3 (diff) | |
| download | bcm5719-llvm-3826566c044e94f8c1e3d26c66f28a5545aab2bc.tar.gz bcm5719-llvm-3826566c044e94f8c1e3d26c66f28a5545aab2bc.zip | |
[CodeView] Mark this pointers as const.
This is for compatibility with MSVC, which also marks this pointers
as being const-qualified.
Fixes llvm.org/pr36526
Differential Revision: https://reviews.llvm.org/D54736
llvm-svn: 347353
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/DebugInfo/COFF/function-options.ll | 10 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/global-type-hashes.ll | 22 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/static-methods.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/type-quals.ll | 22 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/types-basic.ll | 4 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/types-calling-conv.ll | 40 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/types-cvarargs.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/types-data-members.ll | 4 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/types-non-virtual-methods.ll | 12 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/COFF/virtual-methods.ll | 8 |
10 files changed, 77 insertions, 49 deletions
diff --git a/llvm/test/DebugInfo/COFF/function-options.ll b/llvm/test/DebugInfo/COFF/function-options.ll index 0a8c3fba9ec..57d644724e5 100644 --- a/llvm/test/DebugInfo/COFF/function-options.ll +++ b/llvm/test/DebugInfo/COFF/function-options.ll @@ -82,7 +82,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: BClass ({{.*}}) -; CHECK: ThisType: BClass* ({{.*}}) +; CHECK: ThisType: BClass* const ({{.*}}) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x2) ; CHECK: Constructor (0x2) @@ -119,7 +119,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: C1Class ({{.*}}) -; CHECK: ThisType: C1Class* ({{.*}}) +; CHECK: ThisType: C1Class* const ({{.*}}) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -156,7 +156,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: C2Class ({{.*}}) -; CHECK: ThisType: C2Class* ({{.*}}) +; CHECK: ThisType: C2Class* const ({{.*}}) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -257,7 +257,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: BStruct ({{.*}}) -; CHECK: ThisType: BStruct* ({{.*}}) +; CHECK: ThisType: BStruct* const ({{.*}}) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x2) ; CHECK: Constructor (0x2) @@ -309,7 +309,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: BUnion ({{.*}}) -; CHECK: ThisType: BUnion* ({{.*}}) +; CHECK: ThisType: BUnion* const ({{.*}}) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/global-type-hashes.ll b/llvm/test/DebugInfo/COFF/global-type-hashes.ll index 6790e9c01df..0bb68d40a7d 100644 --- a/llvm/test/DebugInfo/COFF/global-type-hashes.ll +++ b/llvm/test/DebugInfo/COFF/global-type-hashes.ll @@ -187,7 +187,7 @@ attributes #2 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-ma ; YAML: - Kind: LF_POINTER ; YAML: Pointer: ; YAML: ReferentType: 4100 -; YAML: Attrs: 32778 +; YAML: Attrs: 33802 ; YAML: - Kind: LF_ARGLIST ; YAML: ArgList: ; YAML: ArgIndices: [ 116, 116 ] @@ -281,17 +281,21 @@ attributes #2 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-ma ; YAML: - DF04AA3125BBC50E ; YAML: - 95CEBA304A2C4493 ; YAML: - C324F82D24D22283 -; YAML: - 74698BE366891D3D +; YAML: - BB039258F2425BCF ; YAML: - DDE23757322DB7C3 -; YAML: - 1692305447C3D360 +; YAML: - C935E8E1F016CC27 ; YAML: - D341E2F9BE57A1C7 -; YAML: - 243F76AED6D8FB79 -; YAML: - C75E2FD5D79D363D -; YAML: - 30FB9353B361B4B8 +; YAML: - DD327744BE6783A4 +; YAML: - 479521BB013A4AEC +; YAML: - 7820AAA31FC8CC67 ; YAML: - 0634944401BCC520 -; YAML: - DF0B7BE0B5AD5B4F -; YAML: - 0916E74F3860DA92 -; YAML: - 17D3CDC3384402DD +; YAML: - F380373F5DE8E9A3 +; YAML: - 2ADB463E9E726E20 +; YAML: - 74698BE366891D3D +; YAML: - 4470750F2E319329 +; YAML: - 0FB556FD1FAB66D7 +; YAML: - 5970EFB4874D0F3F +; YAML: - EDB1D74C120CF44A ; ... diff --git a/llvm/test/DebugInfo/COFF/static-methods.ll b/llvm/test/DebugInfo/COFF/static-methods.ll index 1ff2650a329..19c422ccaf3 100644 --- a/llvm/test/DebugInfo/COFF/static-methods.ll +++ b/llvm/test/DebugInfo/COFF/static-methods.ll @@ -28,7 +28,7 @@ ; CHECK-NEXT: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK-NEXT: ReturnType: void (0x3) ; CHECK-NEXT: ClassType: A ({{.*}}) -; CHECK-NEXT: ThisType: A* ({{.*}}) +; CHECK-NEXT: ThisType: A* const ({{.*}}) ; CHECK-NEXT: CallingConvention: ThisCall (0xB) ; CHECK-NEXT: FunctionOptions [ (0x0) ; CHECK-NEXT: ] diff --git a/llvm/test/DebugInfo/COFF/type-quals.ll b/llvm/test/DebugInfo/COFF/type-quals.ll index ea1deb4764c..c81daa81d0c 100644 --- a/llvm/test/DebugInfo/COFF/type-quals.ll +++ b/llvm/test/DebugInfo/COFF/type-quals.ll @@ -249,7 +249,7 @@ ; CHECK: PtrType: Near64 (0xC) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: IsRestrict: 0 @@ -266,7 +266,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: int (0x74) ; CHECK: ClassType: h::Foo (0x1016) -; CHECK: ThisType: h::Foo* (0x1017) +; CHECK: ThisType: h::Foo* const (0x1017) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -337,16 +337,28 @@ ; CHECK: FunctionType: int h::Foo::(int) (0x1019) ; CHECK: Name: func ; CHECK: } -; CHECK: Modifier (0x1020) { +; CHECK: Pointer (0x1020) { +; CHECK: TypeLeafKind: LF_POINTER (0x1002) +; CHECK: PointeeType: h::Foo (0x1016) +; CHECK: PtrType: Near64 (0xC) +; CHECK: PtrMode: Pointer (0x0) +; CHECK: IsFlat: 0 +; CHECK: IsConst: 0 +; CHECK: IsVolatile: 0 +; CHECK: IsUnaligned: 0 +; CHECK: IsRestrict: 0 +; CHECK: SizeOf: 8 +; CHECK: } +; CHECK: Modifier (0x1021) { ; CHECK: TypeLeafKind: LF_MODIFIER (0x1001) ; CHECK: ModifiedType: char (0x70) ; CHECK: Modifiers [ (0x1) ; CHECK: Const (0x1) ; CHECK: ] ; CHECK: } -; CHECK: Array (0x1021) { +; CHECK: Array (0x1022) { ; CHECK: TypeLeafKind: LF_ARRAY (0x1503) -; CHECK: ElementType: const char (0x1020) +; CHECK: ElementType: const char (0x1021) ; CHECK: IndexType: unsigned __int64 (0x23) ; CHECK: SizeOf: 4 ; CHECK: Name: diff --git a/llvm/test/DebugInfo/COFF/types-basic.ll b/llvm/test/DebugInfo/COFF/types-basic.ll index 220fd5e3939..7b1bb852502 100644 --- a/llvm/test/DebugInfo/COFF/types-basic.ll +++ b/llvm/test/DebugInfo/COFF/types-basic.ll @@ -106,7 +106,7 @@ ; CHECK: PtrType: Near64 (0xC) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: } @@ -120,7 +120,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: A (0x1005) -; CHECK: ThisType: A* (0x1007) +; CHECK: ThisType: A* const (0x1007) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/types-calling-conv.ll b/llvm/test/DebugInfo/COFF/types-calling-conv.ll index d2359bcbf7f..3e0d9f1e364 100644 --- a/llvm/test/DebugInfo/COFF/types-calling-conv.ll +++ b/llvm/test/DebugInfo/COFF/types-calling-conv.ll @@ -33,7 +33,7 @@ ; CHECK: PtrType: Near32 (0xA) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: SizeOf: 4 @@ -48,7 +48,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: A (0x1000) -; CHECK: ThisType: A* (0x1001) +; CHECK: ThisType: A* const (0x1001) ; CHECK: CallingConvention: ThisCall (0xB) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -92,7 +92,19 @@ ; CHECK: FunctionType: void A::() (0x1003) ; CHECK: Name: A::thiscallcc ; CHECK: } -; CHECK: Procedure (0x1009) { +; CHECK: Pointer (0x1009) { +; CHECK: TypeLeafKind: LF_POINTER (0x1002) +; CHECK: PointeeType: A (0x1000) +; CHECK: PtrType: Near32 (0xA) +; CHECK: PtrMode: Pointer (0x0) +; CHECK: IsFlat: 0 +; CHECK: IsConst: 0 +; CHECK: IsVolatile: 0 +; CHECK: IsUnaligned: 0 +; CHECK: IsRestrict: 0 +; CHECK: SizeOf: 4 +; CHECK: } +; CHECK: Procedure (0x100A) { ; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) ; CHECK: ReturnType: void (0x3) ; CHECK: CallingConvention: NearC (0x0) @@ -101,13 +113,13 @@ ; CHECK: NumParameters: 0 ; CHECK: ArgListType: () (0x1002) ; CHECK: } -; CHECK: FuncId (0x100A) { +; CHECK: FuncId (0x100B) { ; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) ; CHECK: ParentScope: 0x0 -; CHECK: FunctionType: void () (0x1009) +; CHECK: FunctionType: void () (0x100A) ; CHECK: Name: cdeclcc ; CHECK: } -; CHECK: Procedure (0x100B) { +; CHECK: Procedure (0x100C) { ; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) ; CHECK: ReturnType: void (0x3) ; CHECK: CallingConvention: NearFast (0x4) @@ -116,13 +128,13 @@ ; CHECK: NumParameters: 0 ; CHECK: ArgListType: () (0x1002) ; CHECK: } -; CHECK: FuncId (0x100C) { +; CHECK: FuncId (0x100D) { ; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) ; CHECK: ParentScope: 0x0 -; CHECK: FunctionType: void () (0x100B) +; CHECK: FunctionType: void () (0x100C) ; CHECK: Name: fastcallcc ; CHECK: } -; CHECK: Procedure (0x100D) { +; CHECK: Procedure (0x100E) { ; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) ; CHECK: ReturnType: void (0x3) ; CHECK: CallingConvention: NearStdCall (0x7) @@ -131,13 +143,13 @@ ; CHECK: NumParameters: 0 ; CHECK: ArgListType: () (0x1002) ; CHECK: } -; CHECK: FuncId (0x100E) { +; CHECK: FuncId (0x100F) { ; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) ; CHECK: ParentScope: 0x0 -; CHECK: FunctionType: void () (0x100D) +; CHECK: FunctionType: void () (0x100E) ; CHECK: Name: stdcallcc ; CHECK: } -; CHECK: Procedure (0x100F) { +; CHECK: Procedure (0x1010) { ; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) ; CHECK: ReturnType: void (0x3) ; CHECK: CallingConvention: NearVector (0x18) @@ -146,10 +158,10 @@ ; CHECK: NumParameters: 0 ; CHECK: ArgListType: () (0x1002) ; CHECK: } -; CHECK: FuncId (0x1010) { +; CHECK: FuncId (0x1011) { ; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) ; CHECK: ParentScope: 0x0 -; CHECK: FunctionType: void () (0x100F) +; CHECK: FunctionType: void () (0x1010) ; CHECK: Name: vectorcallcc ; CHECK: } ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/types-cvarargs.ll b/llvm/test/DebugInfo/COFF/types-cvarargs.ll index 5f1df233e44..deb3e6e3652 100644 --- a/llvm/test/DebugInfo/COFF/types-cvarargs.ll +++ b/llvm/test/DebugInfo/COFF/types-cvarargs.ll @@ -33,7 +33,7 @@ ; CHECK: } ; CHECK: UDTSym { ; CHECK: Kind: S_UDT (0x1108) -; CHECK: Type: void (int, float, <no type>)* (0x100E) +; CHECK: Type: void (int, float, <no type>)* (0x100F) ; CHECK: UDTName: FuncTypedef ; CHECK: } ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/types-data-members.ll b/llvm/test/DebugInfo/COFF/types-data-members.ll index af60838768c..e82a9370f66 100644 --- a/llvm/test/DebugInfo/COFF/types-data-members.ll +++ b/llvm/test/DebugInfo/COFF/types-data-members.ll @@ -363,7 +363,7 @@ ; CHECK: PtrType: Near64 (0xC) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: SizeOf: 8 @@ -372,7 +372,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: DerivedClass (0x1011) -; CHECK: ThisType: DerivedClass* (0x101C) +; CHECK: ThisType: DerivedClass* const (0x101C) ; CHECK: CallingConvention: NearC (0x0) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/types-non-virtual-methods.ll b/llvm/test/DebugInfo/COFF/types-non-virtual-methods.ll index 5c99dae69c1..a06ffb0d995 100644 --- a/llvm/test/DebugInfo/COFF/types-non-virtual-methods.ll +++ b/llvm/test/DebugInfo/COFF/types-non-virtual-methods.ll @@ -67,7 +67,7 @@ ; CHECK: PtrType: Near32 (0xA) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: } @@ -75,7 +75,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: A (0x1003) -; CHECK: ThisType: A* (0x1004) +; CHECK: ThisType: A* const (0x1004) ; CHECK: CallingConvention: ThisCall (0xB) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -146,7 +146,7 @@ ; CHECK: PtrType: Near32 (0xA) ; CHECK: PtrMode: Pointer (0x0) ; CHECK: IsFlat: 0 -; CHECK: IsConst: 0 +; CHECK: IsConst: 1 ; CHECK: IsVolatile: 0 ; CHECK: IsUnaligned: 0 ; CHECK: SizeOf: 4 @@ -155,7 +155,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: B (0x100A) -; CHECK: ThisType: B* (0x100B) +; CHECK: ThisType: B* const (0x100B) ; CHECK: CallingConvention: ThisCall (0xB) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -174,7 +174,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: B (0x100A) -; CHECK: ThisType: B* (0x100B) +; CHECK: ThisType: B* const (0x100B) ; CHECK: CallingConvention: ThisCall (0xB) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] @@ -193,7 +193,7 @@ ; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK: ReturnType: void (0x3) ; CHECK: ClassType: B (0x100A) -; CHECK: ThisType: B* (0x100B) +; CHECK: ThisType: B* const (0x100B) ; CHECK: CallingConvention: ThisCall (0xB) ; CHECK: FunctionOptions [ (0x0) ; CHECK: ] diff --git a/llvm/test/DebugInfo/COFF/virtual-methods.ll b/llvm/test/DebugInfo/COFF/virtual-methods.ll index 78a9489d328..2691ff6de21 100644 --- a/llvm/test/DebugInfo/COFF/virtual-methods.ll +++ b/llvm/test/DebugInfo/COFF/virtual-methods.ll @@ -25,7 +25,7 @@ ; CHECK-NEXT: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK-NEXT: ReturnType: int (0x74) ; CHECK-NEXT: ClassType: A ({{.*}}) -; CHECK-NEXT: ThisType: A* ({{.*}}) +; CHECK-NEXT: ThisType: A* const ({{.*}}) ; CHECK-NEXT: CallingConvention: NearC (0x0) ; CHECK-NEXT: FunctionOptions [ (0x0) ; CHECK-NEXT: ] @@ -39,7 +39,7 @@ ; CHECK-NEXT: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK-NEXT: ReturnType: int (0x74) ; CHECK-NEXT: ClassType: B ({{.*}}) -; CHECK-NEXT: ThisType: B* ({{.*}}) +; CHECK-NEXT: ThisType: B* const ({{.*}}) ; CHECK-NEXT: CallingConvention: NearC (0x0) ; CHECK-NEXT: FunctionOptions [ (0x0) ; CHECK-NEXT: ] @@ -53,7 +53,7 @@ ; CHECK-NEXT: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK-NEXT: ReturnType: int (0x74) ; CHECK-NEXT: ClassType: C ({{.*}}) -; CHECK-NEXT: ThisType: C* ({{.*}}) +; CHECK-NEXT: ThisType: C* const ({{.*}}) ; CHECK-NEXT: CallingConvention: NearC (0x0) ; CHECK-NEXT: FunctionOptions [ (0x0) ; CHECK-NEXT: ] @@ -77,7 +77,7 @@ ; CHECK-NEXT: TypeLeafKind: LF_MFUNCTION (0x1009) ; CHECK-NEXT: ReturnType: int (0x74) ; CHECK-NEXT: ClassType: D ({{.*}}) -; CHECK-NEXT: ThisType: D* ({{.*}}) +; CHECK-NEXT: ThisType: D* const ({{.*}}) ; CHECK-NEXT: CallingConvention: NearC (0x0) ; CHECK-NEXT: FunctionOptions [ (0x0) ; CHECK-NEXT: ] |

