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