#include "codegen.h"
#include "builtins/builtins.h"

using namespace empathy;
using namespace empathy::codegen;
using namespace empathy::builtins;

llvm::Value* Module::buildInstruction( const Context& c, FuncInfos& fi, const llr::Xor& bo )
{
    auto lhs = buildValue( c, fi, bo.lhs() );
    if( !lhs )
        return nullptr;

    auto rhs = buildValue( c, fi, bo.rhs() );
    if( !rhs )
        return nullptr;

    return m_llvmBuilder.CreateXor( lhs, rhs );
}
