2007-08-21 21:43:55 +04:00
|
|
|
//===---- CGBuiltin.cpp - Emit LLVM Code for builtins ---------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 22:59:25 +03:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2007-08-21 21:43:55 +04:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This contains code to emit Objective-C code as LLVM code.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2008-04-09 19:51:31 +04:00
|
|
|
#include "CGObjCRuntime.h"
|
2007-08-21 21:43:55 +04:00
|
|
|
#include "CodeGenFunction.h"
|
|
|
|
#include "CodeGenModule.h"
|
|
|
|
#include "clang/AST/Expr.h"
|
|
|
|
#include "llvm/Constant.h"
|
|
|
|
using namespace clang;
|
|
|
|
using namespace CodeGen;
|
|
|
|
|
2007-08-24 09:35:26 +04:00
|
|
|
llvm::Value *CodeGenFunction::EmitObjCStringLiteral(const ObjCStringLiteral *E){
|
2007-08-21 21:43:55 +04:00
|
|
|
std::string S(E->getString()->getStrData(), E->getString()->getByteLength());
|
2007-08-24 09:35:26 +04:00
|
|
|
return CGM.GetAddrOfConstantCFString(S);
|
2007-08-21 21:43:55 +04:00
|
|
|
}
|
|
|
|
|
2008-04-09 19:51:31 +04:00
|
|
|
CGObjCRuntime::~CGObjCRuntime() {}
|