Skip to content

Commit 502f743

Browse files
authored
Merge pull request rust-lang#138 from ptersilie/ykir_outline
Serialise outlining function attribute.
2 parents b1a3c62 + ea935b9 commit 502f743

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/YkIR/YkIRWriter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class SerialiseInstructionException {
3131
string &what() { return S; }
3232
};
3333

34+
#define YK_OUTLINE_FNATTR "yk_outline"
3435
const char *SectionName = ".yk_ir";
3536
const uint32_t Magic = 0xedd5f00d;
3637
const uint32_t Version = 0;
@@ -705,6 +706,8 @@ class YkIRWriter {
705706
serialiseString(F.getName());
706707
// type_idx:
707708
OutStreamer.emitSizeT(typeIndex(F.getFunctionType()));
709+
// outline:
710+
OutStreamer.emitInt8(F.hasFnAttribute(YK_OUTLINE_FNATTR));
708711
// num_blocks:
709712
OutStreamer.emitSizeT(F.size());
710713
// blocks:

0 commit comments

Comments
 (0)