Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: src/IceFixups.cpp

Issue 1202253002: Includes module header first. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceFixups.cpp - Implementation of Assembler Fixups -----===// 1 //===- subzero/src/IceFixups.cpp - Implementation of Assembler Fixups -----===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the AssemblerFixup class, a very basic 10 // This file implements the AssemblerFixup class, a very basic
11 // target-independent representation of a fixup or relocation. 11 // target-independent representation of a fixup or relocation.
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "IceFixups.h" 15 #include "IceFixups.h"
16
16 #include "IceOperand.h" 17 #include "IceOperand.h"
17 18
18 namespace Ice { 19 namespace Ice {
19 20
20 const Constant *AssemblerFixup::NullSymbol = nullptr; 21 const Constant *AssemblerFixup::NullSymbol = nullptr;
21 22
22 RelocOffsetT AssemblerFixup::offset() const { 23 RelocOffsetT AssemblerFixup::offset() const {
23 if (isNullSymbol()) 24 if (isNullSymbol())
24 return 0; 25 return 0;
25 if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(value_)) 26 if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(value_))
(...skipping 27 matching lines...) Expand all
53 if (isNullSymbol()) 54 if (isNullSymbol())
54 Str << "__Sz_AbsoluteZero"; 55 Str << "__Sz_AbsoluteZero";
55 else 56 else
56 Str << symbol(Ctx); 57 Str << symbol(Ctx);
57 RelocOffsetT Offset = offset() + BaseOffset; 58 RelocOffsetT Offset = offset() + BaseOffset;
58 if (Offset) 59 if (Offset)
59 Str << " + " << Offset; 60 Str << " + " << Offset;
60 } 61 }
61 62
62 } // end of namespace Ice 63 } // end of namespace Ice
OLDNEW
« src/IceConverter.cpp ('K') | « src/IceELFSection.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698