Goose  binaryops.cpp at [5ec364bc88]

File bs/codegen/binaryops.cpp artifact 36cd623520 part of check-in 5ec364bc88


#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 );
}