Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomize layout docs #27

Merged
merged 19 commits into from
Feb 26, 2019
Merged

Randomize layout docs #27

merged 19 commits into from
Feb 26, 2019

Conversation

Nixoncole
Copy link

Here is a PR for the stand alone documentation for the radnomize_layout attribute.

nforbus
nforbus previously approved these changes Feb 26, 2019
Copy link

@nforbus nforbus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any issues with this documentation.

@tim-pugh
Copy link
Member

tim-pugh commented Feb 26, 2019

Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:18: error: Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.tdEnd of line in string literal:
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:make[2]: *** [tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrImpl.dir/build.make:93: tools/clang/include/clang/Sema/AttrParsedAttrImpl.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:23680: tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrImpl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td:Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td  let Heading = "randomize_layout;:
                ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.tdmake[2]: *** [tools/clang/include/clang/Sema/CMakeFiles/ClangAttrTemplateInstantiate.dir/build.make:93: tools/clang/include/clang/Sema/AttrTemplateInstantiate.inc] Error 1
:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.tdIncluded from :/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td:Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td:4102:17: error: make[1]: *** [CMakeFiles/Makefile2:23712: tools/clang/include/clang/Sema/CMakeFiles/ClangAttrTemplateInstantiate.dir/all] Error 2
Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td:Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../Basic/Attr.td:55:
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td:4102:18: /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td:4102:error: 18: End of line in string literal
error: End of line in string literal
  let Heading = "randomize_layout;
   let Heading = "randomize_layout; 
                            ^ 
   ^
Included from Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../Basic/Attr.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td::5555:
:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Sema/../..//clang/Basic/AttrDocs.td::41024102::17make[2]: *** [tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrList.dir/build.make:93: tools/clang/include/clang/Sema/AttrParsedAttrList.inc] Error 1
17: : error: error: Unknown token when parsing a value
Unknown token when parsing a value
  let Heading = "randomize_layout;
   let Heading = "randomize_layout; 
                          ^ 
   ^
make[2]: *** [tools/clang/include/clang/Sema/CMakeFiles/ClangAttrSpellingListIndex.dir/build.make:93: tools/clang/include/clang/Sema/AttrSpellingListIndex.inc] Error 1
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
            55 :
    ^
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102:18: Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td:error: 55:
End of line in string literal
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102  let Heading = "randomize_layout;:
17:  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td : error: 4102 : 18 Unknown token when parsing a value:  
    let Heading = "randomize_layout; error: 
    End of line in string literal  
        let Heading = "randomize_layout;^ 

          Included from   /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td  :   55  :
^ 
 /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td : 4102 : 17 :  ^
error: Unknown token when parsing a value
  let Heading = "randomize_layout;
   Included from  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td :     5555 :
:
  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td : 4102 :^17
: /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../..//clang/Basic/AttrDocs.td:4102:error: 18: Unknown token when parsing a value
error:   let Heading = "randomize_layout;
End of line in string literal
             let Heading = "randomize_layout; 
      ^ 
              ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
make[2]: *** [tools/clang/include/clang/Basic/CMakeFiles/ClangAttrList.dir/build.make:117: tools/clang/include/clang/Basic/AttrList.inc] Error 1
make[2]: *** [tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrKinds.dir/build.make:93: tools/clang/include/clang/Sema/AttrParsedAttrKinds.inc] Error 1
make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrVisitor.dir/build.make:97: tools/clang/include/clang/AST/AttrVisitor.inc] Error 1
make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrTraverse.dir/build.make:97: tools/clang/include/clang/AST/AttrNodeTraverse.inc] Error 1
make[2]: *** [tools/clang/include/clang/Parse/CMakeFiles/ClangAttrSubMatchRulesParserStringSwitches.dir/build.make:93: tools/clang/include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc] Error 1
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../Basic/Attr.td:make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrClasses.dir/build.make:97: tools/clang/include/clang/AST/Attrs.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:22401: tools/clang/include/clang/AST/CMakeFiles/ClangAttrVisitor.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:22497: tools/clang/include/clang/AST/CMakeFiles/ClangAttrTraverse.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23045: tools/clang/include/clang/Basic/CMakeFiles/ClangAttrList.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23562: tools/clang/include/clang/Parse/CMakeFiles/ClangAttrSubMatchRulesParserStringSwitches.dir/all] Error 2
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.tdmake[1]: *** [CMakeFiles/Makefile2:22561: tools/clang/include/clang/AST/CMakeFiles/ClangAttrClasses.dir/all] Error 2
:make[1]: *** [CMakeFiles/Makefile2:23648: tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrList.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23744: tools/clang/include/clang/Sema/CMakeFiles/ClangAttrSpellingListIndex.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23776: tools/clang/include/clang/Sema/CMakeFiles/ClangAttrParsedAttrKinds.dir/all] Error 2
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../..//clang/Basic/AttrDocs.td:make[2]: *** [tools/clang/include/clang/Basic/CMakeFiles/ClangAttrSubjectMatchRuleList.dir/build.make:117: tools/clang/include/clang/Basic/AttrSubMatchRulesList.inc] Error 1
4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
             55make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrImpl.dir/build.make:97: tools/clang/include/clang/AST/AttrImpl.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:23461: tools/clang/include/clang/Basic/CMakeFiles/ClangAttrSubjectMatchRuleList.dir/all] Error 2
Included from Included from  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../Basic/Attr.tdIncluded from :
 /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../Basic/Attr.td:::  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../..//clang/Basic/AttrDocs.td^:
4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
Included from  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../Basic/Attr.td :  55 :
  /home/timpugh_pdx_edu/llvm-project/clang/include/clang/AST/../..//clang/Basic/AttrDocs.td : 4102 : 17 :    error:  ^
Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../..//clang/Basic/AttrDocs.td:4102:18: error: End of line in string literal
  let Heading = "randomize_layout;
                 ^
Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../Basic/Attr.td:55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Parse/../..//clang/Basic/AttrDocs.td:4102:17: error: Unknown token when parsing a value
  let Heading = "randomize_layout;
                ^
55:
55:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../..//clang/Basic/AttrDocs.td::41024102::1818: : error: error: End of line in string literalEnd of line in string literal

  let Heading = "randomize_layout;  let Heading = "randomize_layout;

                                  ^^

Included from Included from /home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/Attr.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../Basic/Attr.td::5555:
:
/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Basic/../..//clang/Basic/AttrDocs.td/home/timpugh_pdx_edu/llvm-project/clang/include/clang/Serialization/../..//clang/Basic/AttrDocs.td::41024102::1717: : error: error: Unknown token when parsing a valueUnknown token when parsing a value

  let Heading = "randomize_layout;  let Heading = "randomize_layout;

                                ^^

make[2]: *** [tools/clang/include/clang/Serialization/CMakeFiles/ClangAttrPCHRead.dir/build.make:93: tools/clang/include/clang/Serialization/AttrPCHRead.inc] Error 1
make[2]: *** [tools/clang/include/clang/Parse/CMakeFiles/ClangAttrParserStringSwitches.dir/build.make:93: tools/clang/include/clang/Parse/AttrParserStringSwitches.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:22593: tools/clang/include/clang/AST/CMakeFiles/ClangAttrImpl.dir/all] Error 2
make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrTextDump.dir/build.make:97: tools/clang/include/clang/AST/AttrTextNodeDump.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:23594: tools/clang/include/clang/Parse/CMakeFiles/ClangAttrParserStringSwitches.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23859: tools/clang/include/clang/Serialization/CMakeFiles/ClangAttrPCHRead.dir/all] Error 2
make[2]: *** [tools/clang/include/clang/Basic/CMakeFiles/ClangAttrHasAttributeImpl.dir/build.make:117: tools/clang/include/clang/Basic/AttrHasAttributeImpl.inc] Error 1
make[2]: *** [tools/clang/include/clang/Serialization/CMakeFiles/ClangAttrPCHWrite.dir/build.make:93: tools/clang/include/clang/Serialization/AttrPCHWrite.inc] Error 1
make[1]: *** [CMakeFiles/Makefile2:22433: tools/clang/include/clang/AST/CMakeFiles/ClangAttrTextDump.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:23827: tools/clang/include/clang/Serialization/CMakeFiles/ClangAttrPCHWrite.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:22949: tools/clang/include/clang/Basic/CMakeFiles/ClangAttrHasAttributeImpl.dir/all] Error 2

@jeffreytakahashi
Copy link

For future usage, Cole gave a great list of links and how to use this:

https://clang.llvm.org/docs/InternalsManual.html#documentation
clang-tblgen -gen-attr-docs -I /path/to/clang/include /path/to/clang/include/clang/Basic/Attr.td -o /path/to/clang/docs/AttributeReference.rst
https://llvm.org/docs/TableGen/BackEnds.html#attrdocs
https://llvm.org/docs/TableGen/index.html

Copy link
Member

@tim-pugh tim-pugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiled and ran clang-tblgen -gen-attr-docs -I /path/to/clang/include /path/to/clang/include/clang/Basic/Attr.td -o /path/to/clang/docs/AttributeReference.rst
and viewed the output.

Looks good!

@tim-pugh
Copy link
Member

tim-pugh commented Feb 26, 2019

Navigate to ~/llvm-project/build/bin and run:

./clang-tblgen -gen-attr-docs -I ../../clang/include/ ../../clang/include/clang/Basic/Attr.td -o ../../clang/docs/AttributeReference.rst

and then navigate to

../../clang/docs/AttributeReference.rst

and search for "randomize_layout" to see the addition.

Copy link

@nforbus nforbus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and ran tbl-gen, everything ran fine.

@jeffreytakahashi jeffreytakahashi merged commit a9655bd into develop Feb 26, 2019
@connorkuehl connorkuehl deleted the randomize_layout_docs branch July 6, 2019 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants