[llvm] r326731 - [llvm-pdbdump] Dump restrict type qualifier
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 11:11:18 PST 2018
Hello Aaron,
One of added tests broke few builders:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/15737
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win
Failing Tests (3):
. . .
LLVM :: tools/llvm-pdbdump/type-qualifiers.test
Please have a look?
Thanks
Galina
On Mon, Mar 5, 2018 at 10:29 AM, Aaron Smith via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: asmith
> Date: Mon Mar 5 10:29:43 2018
> New Revision: 326731
>
> URL: http://llvm.org/viewvc/llvm-project?rev=326731&view=rev
> Log:
> [llvm-pdbdump] Dump restrict type qualifier
>
> Reviewers: zturner, llvm-commits, rnk
>
> Reviewed By: zturner
>
> Subscribers: majnemer
>
> Differential Revision: https://reviews.llvm.org/D43639
>
> Added:
> llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.cpp
> llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.pdb
> llvm/trunk/test/tools/llvm-pdbdump/type-qualifiers.test
> Modified:
> llvm/trunk/tools/llvm-pdbutil/PrettyFunctionDumper.cpp
> llvm/trunk/tools/llvm-pdbutil/PrettyTypedefDumper.cpp
> llvm/trunk/tools/llvm-pdbutil/PrettyVariableDumper.cpp
>
> Added: llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/
> llvm-pdbdump/Inputs/TypeQualifiersTest.cpp?rev=326731&view=auto
> ============================================================
> ==================
> --- llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.cpp
> (added)
> +++ llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.cpp Mon
> Mar 5 10:29:43 2018
> @@ -0,0 +1,55 @@
> +// Compile with "cl /c /Zi /GR- TypeQualifiersTest.cpp"
> +// Link with "link TypeQualifiersTest.obj /debug /nodefaultlib
> /entry:main"
> +
> +union Union {
> + int * __restrict x_member;
> + float * __restrict y_member;
> + int* volatile __restrict m_volatile;
> + const char* m_const;
> +};
> +
> +int f(const volatile int* __restrict arg_crv) {
> + Union u;
> + return 1;
> +}
> +
> +void g(int& __restrict arg_ref) {
> +}
> +
> +namespace NS {
> + class Class {
> + public:
> + int get() const { return 1;}
> + int set() __restrict { return 2; }
> + void help() volatile { return; }
> + };
> +
> + struct Foo {
> + int a;
> + int b;
> + int func(int x) __restrict { return 1; }
> + };
> +
> + Foo s = { 10 };
> +
> + const int* __restrict p_object = &s.a;
> +
> + volatile int Foo:: * __restrict p_data_member = &Foo::a;
> +
> + int (Foo::* p_member_func)(int) __restrict = &Foo::func;
> +}
> +
> +typedef long* __restrict RestrictTypedef;
> +RestrictTypedef RestrictVar;
> +
> +typedef volatile int* __restrict RankNArray[10][100];
> +RankNArray ArrayVar;
> +
> +int main() {
> + NS::Class ClassVar;
> + ClassVar.get();
> + ClassVar.help();
> + ClassVar.set();
> +
> + return 0;
> +}
>
> Added: llvm/trunk/test/tools/llvm-pdbdump/Inputs/TypeQualifiersTest.pdb
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/
> llvm-pdbdump/Inputs/TypeQualifiersTest.pdb?rev=326731&view=auto
> ============================================================
> ==================
> (empty)
>
> Added: llvm/trunk/test/tools/llvm-pdbdump/type-qualifiers.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/
> llvm-pdbdump/type-qualifiers.test?rev=326731&view=auto
> ============================================================
> ==================
> --- llvm/trunk/test/tools/llvm-pdbdump/type-qualifiers.test (added)
> +++ llvm/trunk/test/tools/llvm-pdbdump/type-qualifiers.test Mon Mar 5
> 10:29:43 2018
> @@ -0,0 +1,25 @@
> +; RUN: llvm-pdbutil pretty -all -class-recurse-depth=1 \
> +; RUN: %p/Inputs/TypeQualifiersTest.pdb > %t
> +; RUN: FileCheck -input-file=%t %s -check-prefix=GLOBALS_FUNC
> +; RUN: FileCheck -input-file=%t %s -check-prefix=GLOBALS_DATA
> +; RUN: FileCheck -input-file=%t %s -check-prefix=QUALS
> +
> +; GLOBALS_FUNC: ---GLOBALS---
> +; GLOBALS_FUNC-DAG: int __cdecl f(const volatile int* __restrict arg_crv)
> +; GLOBALS_FUNC-DAG: void __cdecl g(int& __restrict arg_ref)
> +
> +; GLOBALS_DATA: ---GLOBALS---
> +; GLOBALS_DATA-DAG: static volatile int* __restrict ArrayVar[10][100]
> +; GLOBALS_DATA-DAG: static long* __restrict RestrictVar
> +; GLOBALS_DATA-DAG: static const int* __restrict NS::p_object
> +; GLOBALS_DATA-DAG: static NS::Foo NS::s
> +; GLOBALS_DATA-DAG: static volatile int* __restrict NS::p_data_member
> +
> +; QUALS: ---TYPES---
> +; QUALS-DAG: typedef RankNArray
> +; QUALS-DAG: typedef long* __restrict RestrictTypedef
> +; QUALS: union Union
> +; QUALS-DAG: int* __restrict x_member
> +; QUALS-DAG: float* __restrict y_member
> +; QUALS-DAG: int* volatile __restrict m_volatile
> +; QUALS-DAG: const char* m_const
>
> Modified: llvm/trunk/tools/llvm-pdbutil/PrettyFunctionDumper.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-
> pdbutil/PrettyFunctionDumper.cpp?rev=326731&r1=326730&r2=326731&view=diff
> ============================================================
> ==================
> --- llvm/trunk/tools/llvm-pdbutil/PrettyFunctionDumper.cpp (original)
> +++ llvm/trunk/tools/llvm-pdbutil/PrettyFunctionDumper.cpp Mon Mar 5
> 10:29:43 2018
> @@ -252,6 +252,9 @@ void FunctionDumper::dump(const PDBSymbo
> WithColor(Printer, PDB_ColorItem::Keyword).get() << "volatile ";
> PointeeType->dump(*this);
> Printer << (Symbol.isReference() ? "&" : "*");
> +
> + if (Symbol.getRawSymbol().isRestrictedType())
> + WithColor(Printer, PDB_ColorItem::Keyword).get() << " __restrict";
> }
> }
>
>
> Modified: llvm/trunk/tools/llvm-pdbutil/PrettyTypedefDumper.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-
> pdbutil/PrettyTypedefDumper.cpp?rev=326731&r1=326730&r2=326731&view=diff
> ============================================================
> ==================
> --- llvm/trunk/tools/llvm-pdbutil/PrettyTypedefDumper.cpp (original)
> +++ llvm/trunk/tools/llvm-pdbutil/PrettyTypedefDumper.cpp Mon Mar 5
> 10:29:43 2018
> @@ -63,6 +63,9 @@ void TypedefDumper::dump(const PDBSymbol
> PointeeType->dump(*this);
> Printer << ((Symbol.isReference()) ? "&" : "*");
> }
> +
> + if (Symbol.getRawSymbol().isRestrictedType())
> + WithColor(Printer, PDB_ColorItem::Keyword).get() << " __restrict";
> }
>
> void TypedefDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) {
>
> Modified: llvm/trunk/tools/llvm-pdbutil/PrettyVariableDumper.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-
> pdbutil/PrettyVariableDumper.cpp?rev=326731&r1=326730&r2=326731&view=diff
> ============================================================
> ==================
> --- llvm/trunk/tools/llvm-pdbutil/PrettyVariableDumper.cpp (original)
> +++ llvm/trunk/tools/llvm-pdbutil/PrettyVariableDumper.cpp Mon Mar 5
> 10:29:43 2018
> @@ -169,6 +169,9 @@ void VariableDumper::dumpRight(const PDB
> WithColor(Printer, PDB_ColorItem::Keyword).get() << " const";
> if (Symbol.isVolatileType())
> WithColor(Printer, PDB_ColorItem::Keyword).get() << " volatile";
> +
> + if (Symbol.getRawSymbol().isRestrictedType())
> + WithColor(Printer, PDB_ColorItem::Keyword).get() << " __restrict";
> }
>
> void VariableDumper::dump(const PDBSymbolTypePointer &Symbol) {
> @@ -189,6 +192,9 @@ void VariableDumper::dump(const PDBSymbo
> WithColor(Printer, PDB_ColorItem::Keyword).get() << " const ";
> if (Symbol.isVolatileType())
> WithColor(Printer, PDB_ColorItem::Keyword).get() << " volatile ";
> +
> + if (Symbol.getRawSymbol().isRestrictedType())
> + WithColor(Printer, PDB_ColorItem::Keyword).get() << " __restrict ";
> }
>
> void VariableDumper::dumpRight(const PDBSymbolTypePointer &Symbol) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180306/40c31054/attachment.html>
More information about the llvm-commits
mailing list