summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/DarwinAsmParser.cpp
Commit message (Collapse)AuthorAge
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-29
| | | | | | necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207593 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++] Use 'nullptr'.Craig Topper2014-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207083 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Update per naming conventions.Jim Grosbach2014-03-18
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204192 91177308-0d34-0410-b5e6-96231b3b80d8
* Darwin: Add assembler directives to create version-min load commands.Jim Grosbach2014-03-18
| | | | | | | | | | | | Allow object files to be tagged with a version-min load command for iOS or MacOSX. Teach macho-dump to understand the version-min load commands for testcases. rdar://11337778 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204190 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-08
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203342 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Use MachO::SectionType for MCSectionMachO::getType's return typeDavid Majnemer2014-03-07
| | | | | | | | | | This is a straightfoward replacement, it makes debugging a little easier. This has no functional impact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203264 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Remove superfluous section attribute flag definitionsDavid Majnemer2014-03-07
| | | | | | | | | | | | | | | | | | | Summary: llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same definitions for the section flags. Instead, grab the definitions out of support. No functionality change. Reviewers: grosbach, Bigcheese, rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2998 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203211 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-24
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the default values.Rafael Espindola2014-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Support For .bss Named Section Directive For Darwin Targets.Rafael Espindola2013-10-02
| | | | | | Patch by Nicholas White. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191824 91177308-0d34-0410-b5e6-96231b3b80d8
* The integrated darwin assembler can hang in an infinite loop (or get an assert Kevin Enderby2013-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | with a debug build) with this buggy .indirect_symbol directive usage: % cat test.s x: .indirect_symbol _y The assertion is because it is trying to get the symbol index for the symbol _y when it is writing out the indirect symbol table. This line of code in MachObjectWriter::WriteObject() : Write32(Asm.getSymbolData(*it->Symbol).getIndex()); And while there is a symbol _y it does not have any getSymbolData set which is only done in MachObjectWriter::BindIndirectSymbols() for pointer sections or stub sections. I added a check and an error in there to catch this in case something slips through. But to get a better error the parser should detect when a .indirect_symbol directive is used and it is not in a pointer section or stub section. To make that work I moved the handling of the indirect symbol out of the target independent AsmParser code into the DarwinAsmParser code that can check for the proper Mach-O section types. rdar://14825505 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189497 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a wrapper for open.Rafael Espindola2013-07-16
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for subsections to the ELF assembler. Fixes PR8717.Peter Collingbourne2013-04-17
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D598 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179725 91177308-0d34-0410-b5e6-96231b3b80d8
* MCParser: Update method names per coding guidelines.Jim Grosbach2013-02-20
| | | | | | | | | | | | | | | | | | | s/AddDirectiveHandler/addDirectiveHandler/ s/ParseMSInlineAsm/parseMSInlineAsm/ s/ParseIdentifier/parseIdentifier/ s/ParseStringToEndOfStatement/parseStringToEndOfStatement/ s/ParseEscapedString/parseEscapedString/ s/EatToEndOfStatement/eatToEndOfStatement/ s/ParseExpression/parseExpression/ s/ParseParenExpression/parseParenExpression/ s/ParseAbsoluteExpression/parseAbsoluteExpression/ s/CheckForValidSection/checkForValidSection/ http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675 91177308-0d34-0410-b5e6-96231b3b80d8
* [MC/Mach-O] Add AsmParser support for .linker_option directive.Daniel Dunbar2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172778 91177308-0d34-0410-b5e6-96231b3b80d8
* [MC] Fix 80-col violas.Daniel Dunbar2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172776 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the ExtensionDirectiveHandler type in other places where it makes sense.Eli Bendersky2013-01-16
| | | | | | | | | Since we already have this type it's a shame to keep dragging a pair of object and method around explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172584 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach MachO which sections contain codeTim Northover2012-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170349 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Add `.pushsection', `.popsection', and `.previous' directives to Darwin ASM.Bill Wendling2012-08-08
| | | | | | | | | | | | | | | | | | | | | There are situations where inline ASM may want to change the section -- for instance, to create a variable in the .data section. However, it cannot do this without (potentially) restoring to the wrong section. E.g.: asm volatile (".section __DATA, __data\n\t" ".globl _fnord\n\t" "_fnord: .quad 1f\n\t" ".text\n\t" "1:" :::); This may be wrong if this is inlined into a function that has a "section" attribute. The user should use `.pushsection' and `.popsection' here instead. The addition of `.previous' is added for completeness. <rdar://problem/12048387> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161477 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor data-in-code annotations.Jim Grosbach2012-05-18
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157062 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 131644 including the missing header changes:Joerg Sonnenberger2011-05-19
| | | | | | | Introduce -fatal-assembler-warnings for the obvious purpose git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131655 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r131644; it's breaking the build.Eli Friedman2011-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131653 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce -fatal-assembler-warnings for the obvious purposeJoerg Sonnenberger2011-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131644 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127944 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 127939. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127943 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise r126127 to address Daniel's comments. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127939 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't haveDaniel Dunbar2011-03-17
| | | | | | been removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127812 91177308-0d34-0410-b5e6-96231b3b80d8
* Darwin 'as' silently ignores the '.ident' directive.Jim Grosbach2011-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127258 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling.Bill Wendling2010-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116804 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Stop playing unsafe member function pointer calls, this isn'tDaniel Dunbar2010-07-18
| | | | | | | | portable enough. - Downside is we now double dispatch through a stub function, but this isn't performance critical. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108661 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Fix .abort and .secure_log_unique to accept arbitrary tokenDaniel Dunbar2010-07-18
| | | | | | sequences, not just strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108655 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Move Darwin specific parse to DarwinAsmParser.cpp.Daniel Dunbar2010-07-12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108193 91177308-0d34-0410-b5e6-96231b3b80d8