llvm.org GIT mirror llvm / 1323006
[typo] An LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188589 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 6 years ago
9 changed file(s) with 19 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
7878 Because LLVM bitcode files typically contain objects that are not considered to
7979 have addresses until they are linked into an executable image or dynamically
8080 compiled "just-in-time", :program:`llvm-nm` does not print an address for any
81 symbol in a LLVM bitcode file, even symbols which are defined in the bitcode
81 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
8282 file.
8383
8484
13111311 Clang works just like GCC by default. The standard -S and -c arguments
13121312 work as usual (producing a native .s or .o file, respectively).
13131313
1314 #. Next, compile the C file into a LLVM bitcode file:
1314 #. Next, compile the C file into an LLVM bitcode file:
13151315
13161316 .. code-block:: console
13171317
163163 return 0;
164164 }
165165
166 2. Next, compile the C file into a LLVM bitcode file:
166 2. Next, compile the C file into an LLVM bitcode file:
167167
168168 .. code-block:: bat
169169
131131 We generate instrumentation traces and optimized traces into separate
132132 trace caches. We keep the instrumented code around because you don't
133133 want to delete a trace when you still might have to return to it
134 (i.e., return from a llvm_first_trigger() or countPath() call.)
134 (i.e., return from an llvm_first_trigger() or countPath() call.)
135135
136136
407407 custom formatting and parsing of scalar types by specializing ScalarTraits<> on
408408 your data type. When writing, YAML I/O will provide the native type and
409409 your specialization must create a temporary llvm::StringRef. When reading,
410 YAML I/O will provide a llvm::StringRef of scalar and your specialization
410 YAML I/O will provide an llvm::StringRef of scalar and your specialization
411411 must convert that to your native data type. An outline of a custom scalar type
412412 looks like:
413413
5656 union {
5757 void *Result; // If this has been resolved to a resolved pointer
5858 GlobalValue *GV; // If this is a pointer to a GV or an indirect ref.
59 MachineBasicBlock *MBB; // If this is a pointer to a LLVM BB
59 MachineBasicBlock *MBB; // If this is a pointer to an LLVM BB
6060 const char *ExtSym; // If this is a pointer to a named symbol
6161 unsigned Index; // Constant pool / jump table index
6262 unsigned GOTIndex; // Index in the GOT of this symbol/global
4343 virtual bool isAliased(const MachineFrameInfo *) const;
4444
4545 /// mayAlias - Return true if the memory pointed to by this
46 /// PseudoSourceValue can ever alias a LLVM IR Value.
46 /// PseudoSourceValue can ever alias an LLVM IR Value.
4747 virtual bool mayAlias(const MachineFrameInfo *) const;
4848
4949 /// classof - Methods for support type inquiry through isa, cast, and
1919
2020 class raw_ostream;
2121
22 /// emitSourceFileHeader - Output a LLVM style file header to the specified
22 /// emitSourceFileHeader - Output an LLVM style file header to the specified
2323 /// raw_ostream.
2424 void emitSourceFileHeader(StringRef Desc, raw_ostream &OS);
2525
459459 /**
460460 * @defgroup LLVMCCoreModule Modules
461461 *
462 * Modules represent the top-level structure in a LLVM program. An LLVM
462 * Modules represent the top-level structure in an LLVM program. An LLVM
463463 * module is effectively a translation unit or a collection of
464464 * translation units merged together.
465465 *
10401040 * hierarchy of classes within this type. Depending on the instance
10411041 * obtained, not all APIs are available.
10421042 *
1043 * Callers can determine the type of a LLVMValueRef by calling the
1043 * Callers can determine the type of an LLVMValueRef by calling the
10441044 * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These
10451045 * functions are defined by a macro, so it isn't obvious which are
10461046 * available by looking at the Doxygen source code. Instead, look at the
11801180 /**
11811181 * Convert value instances between types.
11821182 *
1183 * Internally, a LLVMValueRef is "pinned" to a specific type. This
1183 * Internally, an LLVMValueRef is "pinned" to a specific type. This
11841184 * series of functions allows you to cast an instance to a specific
11851185 * type.
11861186 *
12021202 * This module defines functions that allow you to inspect the uses of a
12031203 * LLVMValueRef.
12041204 *
1205 * It is possible to obtain a LLVMUseRef for any LLVMValueRef instance.
1205 * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance.
12061206 * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a
12071207 * llvm::User and llvm::Value.
12081208 *
18051805 /**
18061806 * Obtain the function to which this argument belongs.
18071807 *
1808 * Unlike other functions in this group, this one takes a LLVMValueRef
1808 * Unlike other functions in this group, this one takes an LLVMValueRef
18091809 * that corresponds to a llvm::Attribute.
18101810 *
18111811 * The returned LLVMValueRef is the llvm::Function to which this
18301830 /**
18311831 * Obtain the next parameter to a function.
18321832 *
1833 * This takes a LLVMValueRef obtained from LLVMGetFirstParam() (which is
1833 * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is
18341834 * actually a wrapped iterator) and obtains the next parameter from the
18351835 * underlying iterator.
18361836 */
19791979 LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB);
19801980
19811981 /**
1982 * Determine whether a LLVMValueRef is itself a basic block.
1982 * Determine whether an LLVMValueRef is itself a basic block.
19831983 */
19841984 LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val);
19851985
19861986 /**
1987 * Convert a LLVMValueRef to a LLVMBasicBlockRef instance.
1987 * Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
19881988 */
19891989 LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val);
19901990
21412141 /**
21422142 * Obtain the last instruction in a basic block.
21432143 *
2144 * The returned LLVMValueRef corresponds to a LLVM:Instruction.
2144 * The returned LLVMValueRef corresponds to an LLVM:Instruction.
21452145 */
21462146 LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB);
21472147
23232323 unsigned LLVMCountIncoming(LLVMValueRef PhiNode);
23242324
23252325 /**
2326 * Obtain an incoming value to a PHI node as a LLVMValueRef.
2326 * Obtain an incoming value to a PHI node as an LLVMValueRef.
23272327 */
23282328 LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index);
23292329
23302330 /**
2331 * Obtain an incoming value to a PHI node as a LLVMBasicBlockRef.
2331 * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
23322332 */
23332333 LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index);
23342334