use of org.robovm.compiler.llvm.StringConstant in project robovm by robovm.
the class ModuleBuilder method getString.
public Constant getString(String string) {
Global g = strings.get(string);
if (g == null) {
byte[] modUtf8 = stringToModifiedUtf8Z(string);
g = new Global(getStringVarName(modUtf8), Linkage.weak, new StringConstant(modUtf8), true);
addGlobal(g);
strings.put(string, g);
}
return new ConstantGetelementptr(new GlobalRef(g), 0, 0);
}
Aggregations