aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ConstantGen.cc
blob: e14e22ff4621ba6335ffcf8fa29823d434356e69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.hl.num { color:#d75f00; }
.hl.esc { color:#0184bc; }
.hl.sng { color:#50a14f; }
.hl.pps { color:#0184bc; }
.hl.slc { color:#a0a1a7; font-style:italic; }
.hl.com { color:#a0a1a7; font-style:italic; }
.hl.ppc { color:#986801; }
.hl.opt { color:#383a42; }
.hl.ipl { color:#d75f00; }
.hl.lin { color:#696c77; user-select: none;-webkit-user-select: none; }
.hl.hvr { cursor:help; }
.hl.erm { color:#ff0000; font-weight:bold; border:solid 1px red; margin-left: 3em; }
.hl.err { color:#ff0000; font-weight:bold; }
.hl.kwa { color:#a626a4; font-weight:bold; }
.hl.kwb { color:#4078f2; font-weight:bold; }
.hl.kwc { color:#ca1243; font-weight:bold; }
.hl.kwd { color:#c18401; font-weight:bold; }
.hl.kwe { color:#986801; font-weight:bold; }
.hl.kwf { color:#d75f00; font-weight:bold; }
@media (prefers-color-scheme: dark) {
string &Name) {
    Function *TheFunction = Builder.GetInsertBlock()->getParent();
    IRBuilder<> TmpB(&TheFunction->getEntryBlock(), TheFunction->getEntryBlock().begin());
    AllocaInst *Alloca = TmpB.CreateAlloca(Type::getDoubleTy(Context), nullptr, Name);
    Builder.CreateStore(ConstantFP::get(Context, APFloat(0.0)), Alloca);
    NamedValues[Name] = Alloca;
}

Value *RealHandler::createLiteral(double Val) {
    return ConstantFP::get(Context, APFloat(Val));
}